Merge pull request #1363 from owncloud/FixPasswordChange

Fix password change
This commit is contained in:
Lukas Reschke 2013-02-06 11:14:59 -08:00
commit ad644b4e08
1 changed files with 2 additions and 8 deletions

View File

@ -15,14 +15,8 @@ if(OC_User::isAdminUser(OC_User::getUser())) {
if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) { if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
$userstatus = 'subadmin'; $userstatus = 'subadmin';
} }
if(OC_User::getUser() === $username) { if(OC_User::getUser() === $username && OC_User::checkPassword($username, $oldPassword)) {
if (OC_User::checkPassword($username, $oldPassword)) {
$userstatus = 'user'; $userstatus = 'user';
} else {
if (!OC_Util::isUserVerified()) {
$userstatus = null;
}
}
} }
if(is_null($userstatus)) { if(is_null($userstatus)) {