Allow opening the password reset link in a new window when its a URL

This commit is contained in:
Joas Schilling 2016-05-24 09:23:25 +02:00
parent adcf942901
commit 5c063cf7c9
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
2 changed files with 3 additions and 2 deletions

View File

@ -135,7 +135,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'])) { ?>