Merge pull request #24795 from owncloud/issue-24789-reset-password-link-new-window

Allow opening the password reset link in a new window when its a URL
This commit is contained in:
Vincent Petry 2016-05-31 10:12:30 +02:00
commit 235f03da64
2 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,8 @@ class LoginController extends Controller {
}
$parameters['canResetPassword'] = true;
if (!$this->config->getSystemValue('lost_password_link')) {
$parameters['resetPasswordLink'] = $this->config->getSystemValue('lost_password_link', '');
if (!$parameters['resetPasswordLink']) {
if (!is_null($user) && $user !== '') {
$userObj = $this->userManager->get($user);
if ($userObj instanceof IUser) {

View File

@ -57,7 +57,7 @@ script('core', [
</p>
<?php if (!empty($_['invalidpassword']) && !empty($_['canResetPassword'])) { ?>
<a id="lost-password" class="warning" href="">
<a id="lost-password" class="warning" href="<?php p($_['resetPasswordLink']); ?>">
<?php p($l->t('Wrong password. Reset it?')); ?>
</a>
<?php } else if (!empty($_['invalidpassword'])) { ?>