summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--settings/ajax/changepassword.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php
index d421181c3bb..b797fcf9185 100644
--- a/settings/ajax/changepassword.php
+++ b/settings/ajax/changepassword.php
@@ -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)) {