Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] [stable8.2] initialize l10n instance earlier, fixes an undefined var warning foll… #21262

Merged
merged 1 commit into from
Dec 24, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions settings/changepassword/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public static function changeUserPassword($args) {
\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();
}
Expand All @@ -71,7 +71,6 @@ public static function changeUserPassword($args) {
} 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();
}
Expand Down Expand Up @@ -115,7 +114,6 @@ public static function changeUserPassword($args) {
$validRecoveryPassword = $keyManager->checkRecoveryPassword($recoveryPassword);
$recoveryEnabledForUser = $recovery->isRecoveryEnabledForUser($username);
}
$l = new \OC_L10n('settings');

if ($recoveryEnabledForUser && $recoveryPassword === '') {
\OC_JSON::error(array('data' => array(
Expand Down