function user_registrationpassword_mail_tokens in User registration password 7
Same name and namespace in other branches
- 8 user_registrationpassword.module \user_registrationpassword_mail_tokens()
- 6 user_registrationpassword.module \user_registrationpassword_mail_tokens()
Token callback to add unsafe tokens for user mails.
See also
user_registrationpassword_mail()
user_registrationpassword_confirmation_url()
2 string references to 'user_registrationpassword_mail_tokens'
- user_registrationpassword_mail_alter in ./
user_registrationpassword.module - Implements hook_mail_alter().
- _user_registrationpassword_mail_text in ./
user_registrationpassword.module - Returns a mail string for a variable name.
File
- ./
user_registrationpassword.module, line 395 - Enables password creation on registration form.
Code
function user_registrationpassword_mail_tokens(&$replacements, $data, $options) {
user_mail_tokens($replacements, $data, $options);
if (isset($data['user'])) {
$replacements['[user:registrationpassword-url]'] = user_registrationpassword_confirmation_url($data['user']);
}
// For D7 we use the rpt module to enable emails to contain
// the user's password, so no need to add the password
// token here, people just need to install rpt.
}