function _hosting_client_mail_text in Hostmaster (Aegir) 6
Expand the client registration email message based on the variables
This will check for a custom message set in the hosting_client_mail_welcome_subject and hosting_client_mail_welcome_body variables.
2 calls to _hosting_client_mail_text()
- hosting_client_configure in modules/
hosting/ client/ hosting_client.module - Menu callback for the module's settings.
- hosting_client_mail in modules/
hosting/ client/ hosting_client.module - Implementation of hook_mail().
File
- modules/
hosting/ client/ hosting_client.module, line 702
Code
function _hosting_client_mail_text($messageid, $variables = array()) {
// Check if an admin setting overrides the default string.
if ($admin_setting = variable_get('hosting_client_mail_' . $messageid, FALSE)) {
return strtr($admin_setting, $variables);
}
switch ($messageid) {
case 'welcome_subject':
return t('Account details for !username at !site', $variables);
case 'welcome_body':
return t("!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n-- !site team", $variables);
}
}