You are here

function ldap_user_mail in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 8.4 ldap_user/ldap_user.module \ldap_user_mail()
  2. 8.3 ldap_user/ldap_user.module \ldap_user_mail()
  3. 7.2 ldap_user/ldap_user.module \ldap_user_mail()

Implements hook_mail().

File

ldap_user/ldap_user.module, line 144
Module for the LDAP User Entity

Code

function ldap_user_mail($key, &$message, $params) {
  switch ($key) {
    case 'orphaned_accounts':
      $message['subject'] = config('system.site')
        ->get('name') . ' ' . t('Orphaned LDAP Users');
      $message['body'][] = t('The following !count Drupal users no longer have
        corresponding LDAP Entries.  Perhaps they have been removed from the LDAP
        and should be removed:', array(
        '!count' => count($params['accounts']),
      )) . "\n\n" . t('username,mail,edit url') . "\n" . join("\n", $params['accounts']);
      break;
  }
}