aboutsummaryrefslogtreecommitdiffstats
path: root/settings/ajax/changepassword.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/ajax/changepassword.php')
-rw-r--r--settings/ajax/changepassword.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php
index 8d45e62e4d8..ceb4bbeecb0 100644
--- a/settings/ajax/changepassword.php
+++ b/settings/ajax/changepassword.php
@@ -4,6 +4,9 @@
OCP\JSON::callCheck();
OC_JSON::checkLoggedIn();
+// Manually load apps to ensure hooks work correctly (workaround for issue 1503)
+OC_APP::loadApps();
+
$username = isset($_POST["username"]) ? $_POST["username"] : OC_User::getUser();
$password = $_POST["password"];
$oldPassword=isset($_POST["oldpassword"])?$_POST["oldpassword"]:'';
@@ -15,14 +18,8 @@ if(OC_User::isAdminUser(OC_User::getUser())) {
if(OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
$userstatus = 'subadmin';
}
-if(OC_User::getUser() === $username) {
- if (OC_User::checkPassword($username, $oldPassword)) {
- $userstatus = 'user';
- } else {
- if (!OC_Util::isUserVerified()) {
- $userstatus = null;
- }
- }
+if(OC_User::getUser() === $username && OC_User::checkPassword($username, $oldPassword)) {
+ $userstatus = 'user';
}
if(is_null($userstatus)) {