diff options
Diffstat (limited to 'modules/contact')
-rw-r--r-- | modules/contact/contact.module | 4 | ||||
-rw-r--r-- | modules/contact/contact.pages.inc | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/contact/contact.module b/modules/contact/contact.module index 891992703..3ba19a55e 100644 --- a/modules/contact/contact.module +++ b/modules/contact/contact.module @@ -174,7 +174,7 @@ function contact_mail($key, &$message, $params) { '!subject' => $params['subject'], '!category' => isset($params['category']['category']) ? $params['category']['category'] : '', '!form-url' => url($_GET['q'], array('absolute' => TRUE, 'language' => $language)), - '!sender-name' => $params['sender']->name, + '!sender-name' => format_username($params['sender']), '!sender-url' => $params['sender']->uid ? url('user/' . $params['sender']->uid, array('absolute' => TRUE, 'language' => $language)) : $params['sender']->mail, ); @@ -194,7 +194,7 @@ function contact_mail($key, &$message, $params) { case 'user_mail': case 'user_copy': $variables += array( - '!recipient-name' => $params['recipient']->name, + '!recipient-name' => format_username($params['recipient']), '!recipient-edit-url' => url('user/' . $params['recipient']->uid . '/edit', array('absolute' => TRUE, 'language' => $language)), ); $message['subject'] .= t('[!site-name] !subject', $variables, array('langcode' => $language->language)); diff --git a/modules/contact/contact.pages.inc b/modules/contact/contact.pages.inc index 72603a39d..f3827083d 100644 --- a/modules/contact/contact.pages.inc +++ b/modules/contact/contact.pages.inc @@ -64,7 +64,7 @@ function contact_site_form($form, &$form_state) { '#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 255, - '#default_value' => $user->uid ? $user->name : '', + '#default_value' => $user->uid ? format_username($user) : '', '#required' => TRUE, ); $form['mail'] = array( @@ -180,7 +180,7 @@ function contact_personal_form($form, &$form_state, stdClass $recipient) { return drupal_access_denied(); } - drupal_set_title(t('Contact @username', array('@username' => $recipient->name)), PASS_THROUGH); + drupal_set_title(t('Contact @username', array('@username' => format_username($recipient))), PASS_THROUGH); if (!$user->uid) { $form['#attached']['library'][] = array('system', 'cookie'); @@ -196,7 +196,7 @@ function contact_personal_form($form, &$form_state, stdClass $recipient) { '#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 255, - '#default_value' => $user->uid ? $user->name : '', + '#default_value' => $user->uid ? format_username($user) : '', '#required' => TRUE, ); $form['mail'] = array( |