[documentation] user registration mails, variable help.

Bèr Kessels ber at webschuur.com
Thu Jan 5 19:46:28 UTC 2006


Hello,

I just wanted to adjust the user registration mails but was very unpleasantly 
surprised :). The documentation about the variables is not too good. 

I could not find anything on drupal.org. But more importantly, the online 
documentation is very bad. 

Customize the body of the welcome e-mail, which is sent to new members upon 
registering. Available variables are: %username, %site, %password, %uri, 
%uri_brief, %mailto, %login_uri, %edit_uri, %login_url.

tells me absolutely nothing about what var does what. Off course I dove into 
the PHP to find out how to write a nice mail. But I think we should be able 
to come up with something better. :) 

I tried, but unfortunately my engrish is just not good enough to condense this 
into a nice, usefull help text.

FWIW, this is the code

'%username' => $account->name,  
'%site' => variable_get('site_name', 'drupal'), //plain text name
'%login_url' => user_pass_reset_url($account), //not the url to login, but the 
hashed url!
'%uri' => $base_url,
'%uri_brief' => substr($base_url, strlen('http://')), //Why we need this, I 
dont know.
'%mailto' => $account->mail,
'%date' => format_date(time()),
'%login_uri' => url('user', NULL, NULL, TRUE), // Now this is not a RUL, but a 
uri. :) makes sense, huh?
'%edit_uri' => url('user/'. $account->uid .'/edit', NULL, NULL, TRUE));

Maybe someone can come up with some better docs? 

Bèr


More information about the documentation mailing list