add scrutinizer suggestion
This commit is contained in:
@ -122,6 +122,7 @@ class SettingsForm extends Model
|
||||
{
|
||||
if ($this->validate()) {
|
||||
$user = $this->getUser();
|
||||
if ($user instanceof User) {
|
||||
$user->scenario = 'settings';
|
||||
$user->username = $this->username;
|
||||
$user->password = $this->new_password;
|
||||
@ -138,6 +139,7 @@ class SettingsForm extends Model
|
||||
|
||||
return $user->save();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user