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:08:15 +0100 |
commit | 0ecbfae5ff924dba061a94e46e96e5e1c252794e (patch) | |
tree | d43c3f47ae9d323b76551643f01b5919d2b305c8 /settings/changepassword | |
parent | 38f4407761ea2d5cb2562518e207a43622f40b30 (diff) | |
download | nextcloud-server-0ecbfae5ff924dba061a94e46e96e5e1c252794e.tar.gz nextcloud-server-0ecbfae5ff924dba061a94e46e96e5e1c252794e.zip |
initialize l10n instance earlier, fixes an undefined var warning followed by a php error
Diffstat (limited to 'settings/changepassword')
-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 695914683db..f5b9bd58b59 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(); } @@ -78,7 +78,6 @@ class Controller { } elseif ($isUserAccessible) { $userstatus = 'subadmin'; } else { - $l = new \OC_L10n('settings'); \OC_JSON::error(array('data' => array('message' => $l->t('Authentication error')) )); exit(); } @@ -122,7 +121,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( |