From: Björn Schießle Date: Fri, 7 Jun 2013 18:17:48 +0000 (+0200) Subject: only check for recovery key if someone else than the user wants to change the password X-Git-Tag: v6.0.0alpha2~641^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b25ab94a08ab9ba5e322043ac470d5352d456c71;p=nextcloud-server.git only check for recovery key if someone else than the user wants to change the password --- diff --git a/settings/ajax/changepassword.php b/settings/ajax/changepassword.php index 90d213f1792..e8adb8c959f 100644 --- a/settings/ajax/changepassword.php +++ b/settings/ajax/changepassword.php @@ -27,7 +27,7 @@ if (is_null($userstatus)) { OC_JSON::error(array('data' => array('message' => 'Authentication error'))); exit(); } -if (\OCP\App::isEnabled('files_encryption')) { +if (\OCP\App::isEnabled('files_encryption') && $userstatus !== 'user') { $util = new \OCA\Encryption\Util(new \OC_FilesystemView('/'), $username); $recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled'); $recoveryEnabledForUser = $util->recoveryEnabledForUser();