app/Http/Controllers/ProfileController.php: in update() do not create hash for empty password.
This commit is contained in:
parent
099115d613
commit
f3314d106a
1 changed files with 3 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Reference in a new issue