protected function SocialUserLoginForm::setGeneralErrorMessage in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8.2 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8.3 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8.4 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8.5 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8.6 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 8.7 modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 10.3.x modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 10.0.x modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 10.1.x modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
- 10.2.x modules/social_features/social_user/src/Form/SocialUserLoginForm.php \Drupal\social_user\Form\SocialUserLoginForm::setGeneralErrorMessage()
2 calls to SocialUserLoginForm::setGeneralErrorMessage()
- SocialUserLoginForm::validateFinal in modules/
social_features/ social_user/ src/ Form/ SocialUserLoginForm.php - Checks if user was not authenticated, or if too many logins were attempted.
- SocialUserLoginForm::validateNameMail in modules/
social_features/ social_user/ src/ Form/ SocialUserLoginForm.php - Sets an error if supplied username or mail has been blocked.
File
- modules/
social_features/ social_user/ src/ Form/ SocialUserLoginForm.php, line 252
Class
- SocialUserLoginForm
- Class SocialUserLoginForm.
Namespace
Drupal\social_user\FormCode
protected function setGeneralErrorMessage(array &$form, FormStateInterface $form_state) {
$form_state
->setErrorByName('name_or_mail', $this
->t('
<p>Oops, there was an error. This may have happened for the following reasons:</p>
<ul>
<li>Invalid username/email and password combination. </li>
<li>There has been more than one failed login attempt for this account. It is temporarily blocked. </li>
<li>Too many failed login attempts from your computer (IP address). This IP address is temporarily blocked. </li>
</ul>
<p>To solve the issue, try using different login information, try again later, or <a href=":url">request a new password</a></p>', [
'%name_or_email' => $form_state
->getValue('name_or_mail'),
':url' => $this
->url('user.pass'),
]));
}