diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-17 16:08:08 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-17 16:08:08 +0100 |
commit | d402ac91d70ead3e2824c2630904a9add51249e3 (patch) | |
tree | 7300bccbe00007d19ed839c74a484e992f5b1243 | |
parent | 3bcaaa6c3a2bafa9b4685bbbac9e4a1d158bd64e (diff) | |
parent | 0ecbfae5ff924dba061a94e46e96e5e1c252794e (diff) | |
download | nextcloud-server-d402ac91d70ead3e2824c2630904a9add51249e3.tar.gz nextcloud-server-d402ac91d70ead3e2824c2630904a9add51249e3.zip |
Merge pull request #21260 from owncloud/fix-undefined-l10n-var
initialize l10n instance earlier, fixes an undefined var warning foll…
-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( |