fix(customer): save only profile fields on admin PUT
The list edit dumped the whole table row into update(); whitelist form and accounting fields, and skip hashing an empty password. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -130,6 +130,9 @@ class Customer extends Authenticatable implements JWTSubject
|
||||
|
||||
// hash password
|
||||
public function setPasswordAttribute($value){
|
||||
if ($value === null || $value === '') {
|
||||
return;
|
||||
}
|
||||
$this->attributes['password'] = Hash::make($value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user