summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-11-20 15:52:32 +0100
committerGitHub <noreply@github.com>2018-11-20 15:52:32 +0100
commite73bfd5331f51b640717c9fefd4dc5a8248939a7 (patch)
tree2a34e33fcf0a1650aeefee9896aa8938759f0378 /core
parentebc690bbe3a4ce32455181bd160a6164568bf087 (diff)
parent43d6ae7476bbf4d08991b405a63a0f8dbc2ac25a (diff)
downloadnextcloud-server-e73bfd5331f51b640717c9fefd4dc5a8248939a7.tar.gz
nextcloud-server-e73bfd5331f51b640717c9fefd4dc5a8248939a7.zip
Merge pull request #12552 from nextcloud/fix/11146/respect_disabled_password_reset
Respect the disabled setting for lost_password_link
Diffstat (limited to 'core')
-rw-r--r--core/Controller/LoginController.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index d34f243f15f..40e13b43c80 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -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;