only check for recovery key if someone else than the user wants to change the password

This commit is contained in:
Björn Schießle 2013-06-07 20:17:48 +02:00
parent 7fc5151d95
commit b25ab94a08

View 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();