Password check for admins

This commit is contained in:
Lukas Reschke 2012-10-16 00:43:19 +02:00
parent 91d4b23efe
commit c404148f9a
1 changed files with 6 additions and 2 deletions

View File

@ -19,9 +19,13 @@ if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
$userstatus = 'subadmin';
}
if(OC_User::getUser() === $username) {
if (OC_User::checkPassword($username, $oldPassword) && ($userstatus === null || !OC_JSON::isUserVerified()))
if (OC_User::checkPassword($username, $oldPassword))
{
$userstatus = 'user';
} else {
if (!OC_JSON::isUserVerified()) {
$userstatus = null;
}
}
}