From 7c23414eef64593803d2e9ecc6e4f17985b7ebcc Mon Sep 17 00:00:00 2001 From: Ujjwal Bhardwaj Date: Wed, 19 Apr 2017 16:05:05 +0530 Subject: [PATCH] Disable reset password link. Issue: #27440 --- config/config.sample.php | 1 + core/Controller/LoginController.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/config.sample.php b/config/config.sample.php index 9f2ede8816..fb7d41bd9d 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -253,6 +253,7 @@ $CONFIG = array( * read-only user backend like LDAP), you can specify a custom link, where the * user is redirected to, when clicking the "reset password" link after a failed * login-attempt. + * In case you do not want to provide any link, replace the url with 'disabled' */ 'lost_password_link' => 'https://example.org/link/to/password/reset', diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 691d74cdc6..93b695dd99 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -159,6 +159,8 @@ class LoginController extends Controller { $parameters['canResetPassword'] = $userObj->canChangePassword(); } } + } elseif ($parameters['resetPasswordLink'] === 'disabled') { + $parameters['canResetPassword'] = false; } $parameters['alt_login'] = OC_App::getAlternativeLogIns();