Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $mail = drupal_mail('artdiet_iframe', 'homesplace_club_mail', $account->mail, 'he', $params);
- }
- }
- if ($account){
- _artdiet_iframe_update_user_profile($args, $account);
- }
- return $account;
- }
- /**
- *
- * Mail sent to iframe users
- */
- function artdiet_iframe_mail($key, &$message, $params) {
- $language = $message['language'];
- $variables = user_mail_tokens($params['account'], $language);
- $variables['!profile_link'] = url('user/edit/user_metrics', array('absolute' => 'TRUE'));
- $message['subject'] .= _artdiet_iframe_text($key .'_subject', $language, $variables);
- $message['body'][] = _artdiet_iframe_text($key .'_body', $language, $variables);
- }
- /**
- * Returns a mail string for a variable name.
- *
- * Used by artdiet_iframe_mail() and the settings forms to retrieve strings.
- * CSS tags are taken from the htmlmail module setttig page.
- */
- function _artdiet_iframe_text($key, $language = NULL, $variables = array()) {
- $langcode = isset($language) ? $language->language : NULL;
- switch ($key) {
- case 'homesplace_club_mail_subject':
- return t('Account details for !username at !site', $variables, $langcode);
- case 'homesplace_club_mail_body':
- $title = '<div class="title">' . t("Hi !username\n\n", $variables, $langcode) . '</div>' ;
- return '<div class="text">' . $title .
- t("Thank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\n
- username: !username\n
- password: !password\n\n
- You may also log in by clicking on this link or copying and pasting it in your browser:\n\n
- !login_url\n\n
- This is a one-time login, so it can be used only once.\n\n
- After logging in, you will be redirected to !edit_uri so you can change your password.\n
- You may update your profile here !profile_link\n\n\n
- -- !site team", $variables, $langcode) . '</div>' ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement