Merge pull request #12555 from nextcloud/backport/12552/stable14
[stable14] Respect the disabled setting for lost_password_link
This commit is contained in:
commit
47b9e5d08c
|
@ -224,7 +224,9 @@ class LoginController extends Controller {
|
||||||
$parameters['resetPasswordLink'] = $this->config
|
$parameters['resetPasswordLink'] = $this->config
|
||||||
->getSystemValue('lost_password_link', '');
|
->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();
|
$parameters['canResetPassword'] = $userObj->canChangePassword();
|
||||||
} else if ($userObj !== null && $userObj->isEnabled() === false) {
|
} else if ($userObj !== null && $userObj->isEnabled() === false) {
|
||||||
$parameters['canResetPassword'] = false;
|
$parameters['canResetPassword'] = false;
|
||||||
|
|
Loading…
Reference in New Issue