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 9070fd2c03
commit 69e54bde1f
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
2 changed files with 3 additions and 2 deletions

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'])) { ?>

View File

@ -968,7 +968,8 @@ class OC_Util {
}
$parameters['canResetPassword'] = true;
if (!\OC::$server->getSystemConfig()->getValue('lost_password_link')) {
$parameters['resetPasswordLink'] = \OC::$server->getSystemConfig()->getValue('lost_password_link', '');
if (!$parameters['resetPasswordLink']) {
if (isset($_REQUEST['user'])) {
$user = \OC::$server->getUserManager()->get($_REQUEST['user']);
if ($user instanceof IUser) {