Set password property properly

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-08-28 20:47:56 +01:00
parent 611db4c0d2
commit baffcbad71
2 changed files with 2 additions and 2 deletions

View file

@ -368,7 +368,7 @@ class UsersController extends Controller
} else {
$user->password = $user->noPassword();
}
app('App\Http\Requests\ImageUploadRequest')->handleImages($user, 600, 'image', 'avatars', 'avatar');
if ($user->save()) {

View file

@ -252,7 +252,7 @@ class Ldap extends Model
$user->last_name = $item['lastname'];
$user->username = $item['username'];
$user->email = $item['email'];
$user->noPassword();
$user->password = $user->noPassword();
if (Setting::getSettings()->ldap_pw_sync == '1') {
$user->password = bcrypt($password);