Merge pull request #24921 from owncloud/stable9-backport-24795

[9.0] Allow opening the password reset link in a new window when …
This commit is contained in:
Vincent Petry 2016-06-02 15:31:36 +02:00
commit 7f3bfeffe2
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) {