Skip to content
Discussion options

You must be logged in to vote

At this point, I tested deeper.

With setting the columns nullable in the database, bypassed the error message, creating a user without password even if the field was filled.

So I went to app\Orchid\Screens\User\UserEditScreen.php and looked how the save action was handled by the screen. At about line 183, I added the handling method for creating a user.
So after :

// app\Orchid\Screens\User\UserEditScreen.php:183
$user->when($user->exists && ! empty($userData['password']), function (Builder $builder) use ($userData) {
           $builder->getModel()->password = Hash::make($userData['password']);
       });

I added :

// app\Orchid\Screens\User\UserEditScreen.php:188
// User doesn't exists …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by squarou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant