diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-20 15:28:40 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-11-20 15:28:40 +0300 |
commit | 43d6ae7476bbf4d08991b405a63a0f8dbc2ac25a (patch) | |
tree | e4c02fe81a11e24afab4aca9aa14e01e3aef51bb /core/Controller | |
parent | 53418f2795abb423286ea4551f47ffcd9dabc254 (diff) |
Respect the disabled setting for lost_password_link
Fixes #11146
As documented when it is set to disabled the user can't request a lost
password.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/Controller')
-rw-r--r-- | core/Controller/LoginController.php | 4 |
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; |