summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-16 00:28:20 +0200
committerLukas Reschke <lukas@statuscode.ch>2012-10-16 00:47:38 +0200
commitc83a2a5517bc320d418b31005efc6f37c9091b9a (patch)
tree2717c79b1276026d1dd4799cd59d10aa9b3cb99b
parentddcd7383574db2d076def39cfb130b8a4bf0180c (diff)
downloadnextcloud-server-c83a2a5517bc320d418b31005efc6f37c9091b9a.tar.gz
nextcloud-server-c83a2a5517bc320d418b31005efc6f37c9091b9a.zip
Correct check for admin
-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)) {