[support] Hacking core (user)

Blake Hall hall.blake at gmail.com
Tue Oct 21 14:21:39 UTC 2008


This should do the trick...  (assuming you're using Drupal 6):

http://api.drupal.org/api/function/hook_mail_alter

You'll have to create a little custom module, those docs are
http://drupal.org/node/231276

Cheers,

blake hall


On Tue, Oct 21, 2008 at 9:06 AM, Clarke Robin <
Robin.Clarke at networkrail.co.uk> wrote:

> Hi,
>
> I have a requirement to include more information in the notification email
> that is sent to the site administrator when a user registers on the site
> (users can register, but admin approval is required to activate the
> account). The additional information required is the new user's email
> address. The only way I can think of satisfying this requirement is to
> change the User module in core (5.10).
>
> I could simply change this one line in user.module:
>      drupal_mail('user-register-approval-admin', $from, $subject,
> t("!username has applied for an account.\n\n!edit_uri", $variables), $from);
>
> To this:
>      drupal_mail('user-register-approval-admin', $from, $subject,
> t("!username (!mailto) has applied for an account.\n\n!edit_uri",
> $variables), $from);
>
> But I am not really happy about changing core, especially after reading the
> first article on Planet Drupal at the moment (http://robloach.net/node/128)
> which says that the first rule of Drupal is to 'do not hack core'. I can see
> changes becoming very hard to track, especially when it comes to upgrade
> time.
>
> So can someone suggest to me another way to acheive a solution to changing
> the content in this email?
>
> Thanks
> robin
>
>
>
>
> ****************************************************************************************************************************************************************
>
> The content of this email (and any attachment) is confidential. It may also
> be legally privileged or otherwise protected from disclosure.
>
> This email should not be used by anyone who is not an original intended
> recipient, nor may it be copied or disclosed to anyone who is not an
> original intended recipient.
>
> If you have received this email by mistake please notify us by emailing the
> sender, and then delete the email and any copies from your system.
>
> Liability cannot be accepted for statements made which are clearly the
> senders own and not made on behalf of Network Rail.
>
> Network Rail Infrastructure Limited registered in England and Wales No.
> 2904587, registered office Kings Place, 90 York Way London N1 9AG
>
>
> ****************************************************************************************************************************************************************
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20081021/cb6387d7/attachment-0001.htm 


More information about the support mailing list