It's confusing that when you click on someone's name on a blog entry as "Bob smith" you end up at a page with a title of "stinky2023". We should use the same display output here as well.

This is split off from #229660: Use theme_username() in the personal contact form where this originally came up.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webchick’s picture

Issue tags: +Novice

Also, this *should* be a novice issue, in that it is probably be a one or two line fix, although it might be a bit of an adventure figuring out where this title is set.

andypost’s picture

Status: Active » Needs review
FileSize
1.37 KB

So here the patch both for

  $items['user/%user_uid_optional'] = array(
..
  $items['user/%user/edit'] = array(

so testing

dixon_’s picture

I suggest that we fix the issue I created over @ #465160: Make theme_username() able to return username without link first. Before we fix this. I think it is a little bit "hacky" to use filter_xss() where we don't want the username linked.

This solution was first suggested by pwolanin over @ #229660: Use theme_username() in the personal contact form

webchick’s picture

Status: Needs review » Postponed

That sounds good to me!

andypost’s picture

Here the new patch that also fixes user_view

Is it possible to backport this to 6.x? patch incl

plan9’s picture

How about a 5.x patch?

Dave Cohen’s picture

andypost’s picture

Status: Postponed » Needs review

Suppose it's time to review this

Status: Needs review » Needs work

The last submitted patch, theme-username.patch, failed testing.

rschwab’s picture

Status: Needs work » Fixed

In todays 7.x-dev package, within user.module:

/**
 * Menu item title callback - use the user name.
 */
function user_page_title($account) {
  return is_object($account) ? format_username($account) : '';
}

I believe this was probably fixed in the post Dave Cohen mentions in #7. I looked briefly at user.module and format_username() is in wide usage.

rschwab’s picture

Status: Fixed » Closed (duplicate)

More accurate status.