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 |
Jump to:
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
You can easily do this using a theming function such as
<?phpfunction 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
Thanks EvanDonovan..
#3
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
i've decided to implement this in 7.x. for 6.x and below, please use the approach outlined in #1.
#5
http://drupal.org/node/610936
#6
Automatically closed -- issue fixed for 2 weeks with no activity.