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
parent
commit
345938af19
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/Http/Requests/Users/UpdateRequest.php

2
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;

Loading…
Cancel
Save