Browse Source
unset password attribute if null
To prevent remove the password from database row.
pull/60/head
Esmail Alshikh
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
0 deletions
-
app/Http/Requests/Users/UpdateRequest.php
|
|
|
@ -68,6 +68,8 @@ class UpdateRequest extends FormRequest |
|
|
|
|
|
|
|
if ($formData['password']) { |
|
|
|
$formData['password'] = bcrypt($formData['password']); |
|
|
|
} else { |
|
|
|
unset($formData['password']); |
|
|
|
} |
|
|
|
|
|
|
|
return $formData; |
|
|
|
|