Fix change password

This commit is contained in:
ohartl 2016-02-20 22:36:04 +01:00
parent 75598698d1
commit 70b6463501
2 changed files with 5 additions and 2 deletions

View file

@ -229,7 +229,9 @@ class Auth
/** @var User $user */
$user = User::find($userId);
$user->setPasswordHash($passwordHash);
$user->save();
if(!is_null($user)){
$user->setPasswordHash($passwordHash);
$user->save();
}
}
}

View file

@ -26,6 +26,7 @@ class User extends AbstractModel
$thisMappings = array(
'username' => DBC_USERS_USERNAME,
'domain' => DBC_USERS_DOMAIN,
'password_hash' => DBC_USERS_PASSWORD,
);
if(defined('DBC_USERS_MAILBOXLIMIT')){