Archived
1
0
Fork 0

app/Http/Controllers/ProfileController.php: in update() do not create hash for empty password.

This commit is contained in:
Henrik Hautakoski 2021-07-22 18:54:39 +02:00
parent 099115d613
commit f3314d106a

View file

@ -29,7 +29,9 @@ class ProfileController extends Controller
$user = $request->user();
$user->fill($data->except('password')->toArray());
$user->password = Hash::make($data['password']);
if (strlen($data['password'])) {
$user->password = Hash::make($data['password']);
}
$user->save();
return redirect()->route('profile.index')