You are here

function realname_mail_alter in Real Name 6

Implements hook_mail_alter(). Intercepts the user activation form to show the username.

File

./realname.module, line 513

Code

function realname_mail_alter(&$message) {
  switch ($message['id']) {
    case 'user_status_activated':

      // Look for the "username: " string which precedes the username.
      if (isset($message['params']['account']->realname_save)) {
        $message['body'][0] = str_replace(t('username: ') . $message['params']['account']->name, t('username: ') . $message['params']['account']->realname_save, $message['body'][0]);
      }
  }
}