Correct check for admin
This commit is contained in:
parent
ddcd738357
commit
c83a2a5517
|
@ -19,12 +19,10 @@ if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
|
|||
$userstatus = 'subadmin';
|
||||
}
|
||||
if(OC_User::getUser() === $username) {
|
||||
if (OC_User::checkPassword($username, $oldPassword))
|
||||
if (OC_User::checkPassword($username, $oldPassword) && ($userstatus === null || !OC_JSON::isUserVerified()))
|
||||
{
|
||||
$userstatus = 'user';
|
||||
} else {
|
||||
$userstatus = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(is_null($userstatus)) {
|
||||
|
|
Loading…
Reference in New Issue