Make mail message content overridable

gone - February 3, 2009 - 06:38
Project:U Create
Version:6.x-1.0-beta1
Component:ucreate.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Came as a surprise when I updated the default 'Welcome' e-mail text that is mailed to new users via /admin/user/settings, and discovered that when creating new users via UCreate, the text hadn't changed.

Noticed that ucreate.module doesn't check for overridden alternative message from the _variable table in the same way user.module does:

<?php
 
// Check if an admin setting overrides the default string.
 
if ($admin_setting = variable_get('user_mail_'. $messageid, FALSE)) {
    return
strtr($admin_setting, $variables);
  }
 
// No override, return with default strings.
 
else {
.......
?>

Can similar function be added into ucreate so we don't have to make changes both in the admin dashboard as well as the hardcoded version in the module code?

#1

alex_b - February 4, 2009 - 16:13
Title:Implement similar functionality to _user_mail_text from user.module, to account for overridden welcoming e-mail text» Make mail message content overridable

It _can_ and it _should_ :-)

Would rather see this in 6.x though...

#2

gone - February 5, 2009 - 10:11

That's fair enough! It was just on a 5x site that I noticed :)

Cheers. Thanks for making the issue title more sane too :)

#3

alex_b - February 5, 2009 - 14:15
Version:5.x-1.0» 6.x-1.0-beta1

o, actually this should be 6.

#4

zmove - March 6, 2009 - 10:38

More simple to implement, put the mail template in a theme_ function.

At least, developpers whoule be able to theme them without hacking the core.

A new fieldset in the user setting page is better, but it would be a good begining.

 
 

Drupal is a registered trademark of Dries Buytaert.