Password check for admins
This commit is contained in:
parent
91d4b23efe
commit
c404148f9a
|
@ -19,10 +19,14 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(is_null($userstatus)) {
|
||||
|
|
Loading…
Reference in New Issue