Skip to content

Commit

Permalink
Merge pull request #12552 from nextcloud/fix/11146/respect_disabled_p…
Browse files Browse the repository at this point in the history
…assword_reset

Respect the disabled setting for lost_password_link
  • Loading branch information
rullzer authored Nov 20, 2018
2 parents ebc690b + 43d6ae7 commit e73bfd5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ private function setPasswordResetParameters(
$parameters['resetPasswordLink'] = $this->config
->getSystemValue('lost_password_link', '');

if (!$parameters['resetPasswordLink'] && $userObj !== null) {
if ($parameters['resetPasswordLink'] === 'disabled') {
$parameters['canResetPassword'] = false;
} else if (!$parameters['resetPasswordLink'] && $userObj !== null) {
$parameters['canResetPassword'] = $userObj->canChangePassword();
} else if ($userObj !== null && $userObj->isEnabled() === false) {
$parameters['canResetPassword'] = false;
Expand Down

0 comments on commit e73bfd5

Please sign in to comment.