Link username to my account page in logged in block

caschbre - June 23, 2009 - 03:28
Project:LoginToboggan
Version:7.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I really enjoy the functionality that logintoboggan provides. One request I do have would be to change the username that is displayed in the "LoginToboggan logged in block" from static text to a link to the user's my account page.

#1

EvanDonovan - July 4, 2009 - 00:05
Status:active» needs review

You can easily do this using a theming function such as

<?php
function your-theme_lt_loggedinblock(){
  global
$user;
  return
l(check_plain($user->name), 'user/' . $user->uid) .' | ' . l(t('Log out'), 'logout');
}
?>

Note that the code given above is untested. It should work, though, after you add it to your theme's template.php file & rebuild the theme registry (which you can do by visiting admin/build/themes).

However, I would suggest you consider that this change might make it more difficult for people to click logout, since they might click their username by mistake.

(Unrelated: was my reply the first 4th of July post in Drupal's timezone? I'll have to check...)

#2

pipicom - August 24, 2009 - 23:05

Thanks EvanDonovan..

#3

kbell - September 28, 2009 - 01:29

I agree, however, that this is one of the several mods I have to use every time I use logintoboggan - from a usability standpoint, it's what users expect, and I would love to not have to add this custom to every site I do :-)

Thank you for a wonderful module.

#4

hunmonk - October 9, 2009 - 00:47
Version:6.x-1.5» 7.x-1.x-dev
Status:needs review» active

i've decided to implement this in 7.x. for 6.x and below, please use the approach outlined in #1.

#5

hunmonk - October 21, 2009 - 19:27
Title:Link username to my account page» Link username to my account page in logged in block
Status:active» fixed

http://drupal.org/node/610936

#6

System Message - November 4, 2009 - 19:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.