diff options
Diffstat (limited to 'modules/user')
-rw-r--r-- | modules/user/user.api.php | 2 | ||||
-rw-r--r-- | modules/user/user.module | 4 | ||||
-rw-r--r-- | modules/user/user.test | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/user/user.api.php b/modules/user/user.api.php index aca316ac2..c1e04ad53 100644 --- a/modules/user/user.api.php +++ b/modules/user/user.api.php @@ -320,7 +320,7 @@ function hook_user_view($account) { $account->content['summary']['blog'] = array( '#type' => 'user_profile_item', '#title' => t('Blog'), - '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => $account->name))))), + '#markup' => l(t('View recent blog entries'), "blog/$account->uid", array('attributes' => array('title' => t("Read !username's latest blog entries.", array('!username' => format_username($account)))))), '#attributes' => array('class' => array('blog')), ); } diff --git a/modules/user/user.module b/modules/user/user.module index b35d10268..d8a60d8d3 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1251,7 +1251,7 @@ function template_preprocess_user_picture(&$variables) { $filepath = variable_get('user_picture_default', ''); } if (isset($filepath)) { - $alt = t("@user's picture", array('@user' => $account->name ? $account->name : variable_get('anonymous', t('Anonymous')))); + $alt = t("@user's picture", array('@user' => format_username($account))); if (module_exists('image') && $style = variable_get('user_picture_style', '')) { $variables['user_picture'] = theme('image_style', array('style_name' => $style, 'path' => $filepath, 'alt' => $alt, 'title' => $alt, 'attributes' => array(), 'getsize' => FALSE)); } @@ -1632,7 +1632,7 @@ function user_uid_optional_to_arg($arg) { * Menu item title callback - use the user name. */ function user_page_title($account) { - return $account->name; + return format_username($account); } /** diff --git a/modules/user/user.test b/modules/user/user.test index 1220e6c54..67d885722 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -701,7 +701,7 @@ class UserPictureTestCase extends DrupalWebTestCase { // user's profile page. $text = t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $test_dim)); $this->assertRaw($text, t('Image was resized.')); - $alt = t("@user's picture", array('@user' => $this->user->name)); + $alt = t("@user's picture", array('@user' => format_username($this->user))); $style = variable_get('user_picture_style', ''); $this->assertRaw(image_style_url($style, $pic_path), t("Image is displayed in user's edit page")); |