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?
Comments
Comment #1
Amazon commentedBer, what page are you talking about?
I assume it's not this one. http://drupal.org/handbook/modules/user
I am happy to help edit your documentation when you take the initiative to get things started.
Kieran
Comment #2
Bèr Kessels commentedAmazon, no I am not talking about the handbook page or the extracted help. That one is fine.
I am referring to the help textst that appear below the textfields. They list the available variables, that can be used in the welcome mail. Yet we have no documentation on *what* the variables do and *what* they will be replaced with.
That is the documentation, I would like to see, And therefore I listed the variables with some comments in my issue.
Comment #3
add1sun commentedThe issue here is really about core Drupal, documentation component but we don't seem to have this documented in the handbook for user module. A list of what they are, what they mean and an example of the output would be nice to have.
Comment #4
anschinsan commentedComment #5
sunThose fake tokens have been replaced by a real Token system in core now.
Please help over there: #514990: Add a UI for browsing tokens