Merge pull request #12552 from nextcloud/fix/11146/respect_disabled_password_reset

Respect the disabled setting for lost_password_link
This commit is contained in:
Roeland Jago Douma 2018-11-20 15:52:32 +01:00 committed by GitHub
commit e73bfd5331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -232,7 +232,9 @@ class LoginController extends Controller {
$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;