[support] Hacking core (user)

Clarke Robin Robin.Clarke at networkrail.co.uk
Tue Oct 21 14:06:53 UTC 2008


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 

**************************************************************************************************************************************************************** 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4176 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/support/attachments/20081021/a853b0d7/attachment.bin 


More information about the support mailing list