Whenever a user registers an account, the automated emails (which I can set in admin/config/people/accounts
) are not carrying over the defined variables for username, email, etc.
For example. Here's what I have set for one email:
[user:name],
Thank you for registering at [site:name]. Your application for an account is currently pending approval. Once it has been approved, you will receive another e-mail containing information about how to log in, set your password, and other details.
-- [site:name] team
Those variables in brackets just aren't appearing. The email sends as usual, but where those variables are, nothing gets inserted. Is there something I have to enable first?
The token replacement in mails happen in line 2815 of user.module (modules/user/user.module). You can add the following line of code
drupal_set_message("Text: $text, Variables: " . print_r($variables, TRUE) . ", Language: $language);
before the line that says
return token_replace($text, $variables, array('language' => $language, 'callback' => 'user_mail_tokens', 'sanitize' => FALSE, 'clear' => TRUE));
That will tell you as messages what is happening with the token replacement issue. If you can post the messages that you see back here I can help solve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With