]> source.dussan.org Git - nextcloud-server.git/commitdiff
only check for recovery key if someone else than the user wants to change the password
authorBjörn Schießle <schiessle@owncloud.com>
Fri, 7 Jun 2013 18:17:48 +0000 (20:17 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 7 Jun 2013 18:17:48 +0000 (20:17 +0200)
settings/ajax/changepassword.php

index 90d213f1792af863a1d26a2fb6e0c0f914d4af28..e8adb8c959fdf5a640e947550685acffbaffc22a 100644 (file)
@@ -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();