I'm a little confused by how to handle the customized features of authcache, and was wondering if a guru might be able to lend a hand.

I call my login and user information in template.php. Here is my code:

function theme_user_bar() {
  global $user;
  $output = '';

  if (!$user->uid) {
    $output .= drupal_get_form('user_login_block');
  }
  else {
    $output .= t('<p class="user-info">Welcome back!</p>', array('!user' => theme('username', $user)));
 
    $output .= theme('item_list', array(
      l(t('Your account'), 'user/'.$user->uid, array('title' => t('My account'))),
      l(t('Sign out'), 'logout')));
  }

  $output = '<div id="user-bar">'.$output.'</div>';

  return $output;
}

I don't understand how I can alter that for $user_link to handle the customized user content? I would really appreciate any help I could get.

Comments

djudd’s picture

I guess what I really need to know if is $user_link can be placed in the template.php file?

djudd’s picture

Okay, I got that part figured out. I didn't end up using template.php and just edited my page templates instead. My next question is about users with two words in their name.

If I have a user with two words in their username, it shows a + between the words on certain pages but not on others. For example, my test name is Arrogant Jerk. On my account page it shows the username correctly. On the home page it's Arrogant+Jerk.

Anyone seen that before?

simg’s picture

Status: Active » Closed (fixed)

closing this issue as it's so old. you're welcome to re-open.