add scrutinizer suggestion

This commit is contained in:
Antonio Ramirez
2017-06-13 16:03:14 +02:00
parent e9fcde48fb
commit 95ebe6d799

View File

@ -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;
}