]> source.dussan.org Git - nextcloud-server.git/commitdiff
Respect the disabled setting for lost_password_link 12555/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 20 Nov 2018 12:28:40 +0000 (13:28 +0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Tue, 20 Nov 2018 14:53:19 +0000 (14:53 +0000)
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>
core/Controller/LoginController.php

index 182d2bc106d3bff7eb07eb2471ccbbe5e80e7ebc..c30206ff3d56b37fb6c80c81ea656b1665f0b54f 100644 (file)
@@ -224,7 +224,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;