function commons_profile_base_strongarm_alter in Drupal Commons 7.3
Implements hook_strongarm_alter().
File
- modules/
commons/ commons_profile_base/ commons_profile_base.module, line 61
Code
function commons_profile_base_strongarm_alter(&$items) {
// The default user registration emails include tokens which display user
// names as realnames. Realnames cannot be used for logging in or resetting
// passwords which leads to confusion.
// Replace the tokens with their raw equivalents so user emails display
// usernames instead of realnames.
if (module_exists('realname')) {
if (isset($items['user_mail_register_admin_created_body'])) {
$items['user_mail_register_admin_created_body']->value = '[user:name-raw],
A site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:
[user:one-time-login-url]
This link can only be used once to log in and will lead you to a page where you can set your password.
After setting your password, you will be able to log in at [site:login-url] in the future using:
username: [user:name-raw]
password: Your password
-- [site:name] team';
}
if (isset($items['user_mail_register_no_approval_required_body'])) {
$items['user_mail_register_no_approval_required_body']->value = '[user:name-raw],
Thank you for registering at [site:name]. You may now log in by clicking this link or copying and pasting it to your browser:
[user:one-time-login-url]
This link can only be used once to log in and will lead you to a page where you can set your password.
After setting your password, you will be able to log in at [site:login-url] in the future using:
username: [user:name-raw]
password: Your password
-- [site:name] team';
}
if (isset($items['user_mail_status_activated_body'])) {
$items['user_mail_status_activated_body']->value = '[user:name],
Your account at [site:name] has been activated.
You may now log in by clicking this link or copying and pasting it into your browser:
[user:one-time-login-url]
This link can only be used once to log in and will lead you to a page where you can set your password.
After setting your password, you will be able to log in at [site:login-url] in the future using:
username: [user:name-raw]
password: Your password
-- [site:name] team';
}
}
}