Correct check for admin

This commit is contained in:
Lukas Reschke 2012-10-16 00:28:20 +02:00
parent ddcd738357
commit c83a2a5517
1 changed files with 2 additions and 4 deletions

View File

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