function login_security_mail in Login Security 2.x
Same name and namespace in other branches
- 8 login_security.module \login_security_mail()
- 6 login_security.module \login_security_mail()
- 7 login_security.module \login_security_mail()
Implements hook_mail().
File
- ./
login_security.module, line 457 - Login Security module hooks.
Code
function login_security_mail($key, &$message, $variables) {
$conf = \Drupal::config('login_security.settings');
switch ($key) {
case 'block_user_notify':
$message['subject'] = new FormattableMarkup($conf
->get('user_blocked_email_subject'), $variables);
$message['body'][] = new FormattableMarkup($conf
->get('user_blocked_email_body'), $variables);
break;
case 'login_activity_notify':
$message['subject'] = new FormattableMarkup($conf
->get('login_activity_email_subject'), $variables);
$message['body'][] = new FormattableMarkup($conf
->get('login_activity_email_body'), $variables);
break;
}
}