Problem/Motivation
Several tokens can be used in the e-mail messages configured on /admin/config/people/accounts, but it is not clear what each token represents.
Steps to reproduce
Visit /admin/config/people/accounts as a site administrator, and scroll down to the Emails section. Each vertical tab includes the text,
Available variables are: [site:name], [site:url], [user:display-name], [user:account-name], [user:mail], [site:login-url], [site:url-brief], [user:edit-url], [user:one-time-login-url], [user:mail-change-url], [user:cancel-url].
Proposed resolution
To be determined (TBD).
Perhaps we should expand the help text.
Perhaps, instead of repeating the help text in each vertical tab, we should move it to a separate section.
Remaining tasks
User interface changes
TBD
API changes
None
Data model changes
None
Release notes snippet
TBD
Original report by [joachim]
$email_token_help = t('Available variables are:') . ' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url, !cancel_url.';
The above message is shown to the admin user without any explanation of what the tokens mean. I can guess at some of them, but what is !uri_brief for instance? Or !mailto?
Comments
Comment #2
derjochenmeyer commentedThis seems to be old code from user.admin.inc (part of the user module). The current code/text is more descriptive, so this seems fixed?
Current code:
Comment #3
joachim commentedFaced with that, I still wouldn't know which of [user:one-time-login-url] and [site:login-url] to use.
Comment #4
derjochenmeyer commentedTrue for new users/admins, but the interface gives you example usage, so I still think there is enough clarifying information here:
Comment #5
retester2010 commentedno patch here, so active
Comment #6
scotwith1tnever paid close enough attention, but i found myself wondering this today as well! the !mailto token i found to be the email for the person who is registering. i definitely second the idea of clearer description of each token on the registration settings page. i went ahead and figured out what they all are just in case anyone comes across this one:
Tokens are:
!username - requested username during registration process
!site - Site name from Site Configuration page
!password - temporary pwd selected by system or the chosen password by the user
!uri - uri to site (including http://)
!uri_brief - uri to site (without http://)
!mailto - email of user registering
!date - registration date (Medium format)
!login_uri - link to /user page
!edit_uri - link to /user/[uid]/edit page
!login_url - one-time use link for logging in
Comment #7
5t4rdu5t commentedUseful post, scot.self. Thank you.
Comment #8
benjifisherNot much has changed since this issue was created.
I think the policy is still that bugs have to be fixed in the current version of Drupal before they are fixed in an older one, so I am changing the target branch to 9.4.x. I am also updating the issue summary.
The code snippet is now in
Drupal\user\AccountSettingsForm::buildForm():Comment #12
pameeela commentedChanging this to a task because I think it would just be an improvement. Since the OP, the token format has changed and I think it is much more clear what they all mean.
Comment #13
pameeela commented