Disable Drupal’s default “user X has applied for an account” email
By default Drupal sends an email to the site admin; it’s not editable (and you cannot disable it) from the account settings page.
On a recent project I had to use Rules to send some emails when a user registers for an account. Because I was already sending emails via Rules, I needed to disable the stock admin email. Here’s a quick way to do this:
1 2 3 4 5 6 7 8 9 10 11 |
/** * Implements hook_mail_alter(). */ function mymodule_mail_alter(&$message) { switch ($message['id']) { case 'user_register_pending_approval_admin': // Don't send the default approval email to the admin (we're using Rules for this) $message ['send'] = FALSE; break; } } |