Merge pull request #12555 from nextcloud/backport/12552/stable14

[stable14] Respect the disabled setting for lost_password_link
This commit is contained in:
Morris Jobke 2018-11-22 14:53:46 +01:00 committed by GitHub
commit 47b9e5d08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -224,7 +224,9 @@ class LoginController extends Controller {
$parameters['resetPasswordLink'] = $this->config $parameters['resetPasswordLink'] = $this->config
->getSystemValue('lost_password_link', ''); ->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(); $parameters['canResetPassword'] = $userObj->canChangePassword();
} else if ($userObj !== null && $userObj->isEnabled() === false) { } else if ($userObj !== null && $userObj->isEnabled() === false) {
$parameters['canResetPassword'] = false; $parameters['canResetPassword'] = false;