protected function AuthController::auth0FailWithVerifyEmail in Auth0 Single Sign On 8
Same name and namespace in other branches
- 8.2 src/Controller/AuthController.php \Drupal\auth0\Controller\AuthController::auth0FailWithVerifyEmail()
Email not verified error message.
1 call to AuthController::auth0FailWithVerifyEmail()
- AuthController::processUserLogin in src/
Controller/ AuthController.php - Process the auth0 user profile and signin or signup the user.
File
- src/
Controller/ AuthController.php, line 408
Class
- AuthController
- Controller routines for auth0 authentication.
Namespace
Drupal\auth0\ControllerCode
protected function auth0FailWithVerifyEmail($idToken) {
$url = Url::fromRoute('auth0.verify_email', array(), array());
$formText = "<form style='display:none' name='auth0VerifyEmail' action=@url method='post'><input type='hidden' value=@token name='idToken'/></form>";
$linkText = "<a href='javascript:null' onClick='document.forms[\"auth0VerifyEmail\"].submit();'>here</a>";
return $this
->failLogin(t($formText . "Please verify your email and log in again. Click {$linkText} to Resend verification email.", array(
'@url' => $url
->toString(),
'@token' => $idToken,
)), 'Email not verified');
}