diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-17 15:01:21 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-12-17 15:48:45 +0100 |
commit | 6c5c14fc69167376d164cea3c0006226ec5b30c7 (patch) | |
tree | 77d0a0846fa82932eef6cc2fb1794828458c4d7e /settings | |
parent | f152228f4cfe9510badb5c27d75d1118b9979aab (diff) | |
download | nextcloud-server-6c5c14fc69167376d164cea3c0006226ec5b30c7.tar.gz nextcloud-server-6c5c14fc69167376d164cea3c0006226ec5b30c7.zip |
initialize l10n instance earlier, fixes an undefined var warning followed by a php error
Diffstat (limited to 'settings')
-rw-r--r-- | settings/changepassword/controller.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/settings/changepassword/controller.php b/settings/changepassword/controller.php index 3fa3ac67edb..6aefdd4929d 100644 --- a/settings/changepassword/controller.php +++ b/settings/changepassword/controller.php @@ -55,10 +55,10 @@ class Controller { \OC_JSON::callCheck(); \OC_JSON::checkLoggedIn(); + $l = new \OC_L10n('settings'); if (isset($_POST['username'])) { $username = $_POST['username']; } else { - $l = new \OC_L10n('settings'); \OC_JSON::error(array('data' => array('message' => $l->t('No user supplied')) )); exit(); } @@ -71,7 +71,6 @@ class Controller { } elseif (\OC_SubAdmin::isUserAccessible(\OC_User::getUser(), $username)) { $userstatus = 'subadmin'; } else { - $l = new \OC_L10n('settings'); \OC_JSON::error(array('data' => array('message' => $l->t('Authentication error')) )); exit(); } @@ -115,7 +114,6 @@ class Controller { $validRecoveryPassword = $keyManager->checkRecoveryPassword($recoveryPassword); $recoveryEnabledForUser = $recovery->isRecoveryEnabledForUser($username); } - $l = new \OC_L10n('settings'); if ($recoveryEnabledForUser && $recoveryPassword === '') { \OC_JSON::error(array('data' => array( |