private function LoginController::loginUserNotSetFinalize in LDAP Single Sign On 8.4
Same name and namespace in other branches
- 8 src/Controller/LoginController.php \Drupal\ldap_sso\Controller\LoginController::loginUserNotSetFinalize()
Finalize login with user not set.
1 call to LoginController::loginUserNotSetFinalize()
- LoginController::loginRemoteUser in src/
Controller/ LoginController.php - Perform the actual logging in of the user.
File
- src/
Controller/ LoginController.php, line 284
Class
- LoginController
- Login controller.
Namespace
Drupal\ldap_sso\ControllerCode
private function loginUserNotSetFinalize() : void {
$this->detailLog
->log('User not found, SSO aborted.', [], 'ldap_sso');
setcookie('sso_stop', 'sso_stop', $this
->getCookieLifeTime(), base_path(), '');
$this
->messenger()
->addError($this
->t('Sorry, your LDAP credentials were not found or the LDAP server is not available. You may log in with other credentials on the %user_login_form.', [
'%user_login_form' => Link::fromTextAndUrl('login form', Url::fromRoute('user.login'))
->toString(),
]));
$this->detailLog
->log('User not found or server error, redirecting to front page', [], 'ldap_sso');
}