function legal_deny_with_redirect in Legal 8
Same name and namespace in other branches
- 2.0.x legal.module \legal_deny_with_redirect()
Deny access and clean up cookies.
1 call to legal_deny_with_redirect()
- LegalLogin::validateForm in src/
Form/ LegalLogin.php - Form validation handler.
File
- ./
legal.module, line 873 - Module file for Legal.
Code
function legal_deny_with_redirect() {
user_cookie_delete('legal_hash');
user_cookie_delete('legal_id');
\Drupal::messenger()
->addMessage(t('Operation timed out. Please try to log in again.'));
$response = new RedirectResponse('/');
$response
->sendHeaders();
exit;
}