Correct check for admin
This commit is contained in:
parent
ddcd738357
commit
c83a2a5517
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue