]> source.dussan.org Git - nextcloud-server.git/commitdiff
Disable reset password link. Issue: #27440
authorUjjwal Bhardwaj <ujjwalb1996@gmail.com>
Wed, 19 Apr 2017 10:35:05 +0000 (16:05 +0530)
committerJoas Schilling <coding@schilljs.com>
Thu, 11 May 2017 08:27:33 +0000 (10:27 +0200)
config/config.sample.php
core/Controller/LoginController.php

index 9f2ede88169f923618247897efd385f19af9c17b..fb7d41bd9da45ad45384744b74834d8f28940cce 100644 (file)
@@ -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',
 
index 691d74cdc604e28662670dd10b1264fb3a12b369..93b695dd9992c48447fd589417b91ea42fce9c6f 100644 (file)
@@ -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();