You are here

function password_policy_mail in Password Policy 7

Same name and namespace in other branches
  1. 6 password_policy.module \password_policy_mail()
  2. 7.2 password_policy.module \password_policy_mail()

Implements hook_mail().

File

./password_policy.module, line 690
Allows enforcing restrictions on user passwords by defining policies.

Code

function password_policy_mail($key, &$message, $params) {
  $language = $message['language'];
  $variables = array(
    'user' => $params['account'],
    'days_left' => $params['days_left'],
  );
  $message['subject'] .= _password_policy_mail_text($key . '_subject', $language, $variables);
  $message['body'][] = _password_policy_mail_text($key . '_body', $language, $variables);
}