How to determine username of currently logged in user?

barun019

Joined: 2005-06-08
Posts: 9
Posted: Thu, 2005-08-11 05:54

For a customization I am working on (I'm going to post a separate message about it), I would like to determine the username of the person currently logged in within the theme.tpl file. But I can't seem to get that to work. I expected the following piece of code to work, but it didn't:

{php}$USERNAME= GalleryUser::getuserName();
echo $USERNAME;{/php}

(Nothing is printed to the screen, regardless of which user I am logged in as)
Anybody have any ideas?

 
barun019

Joined: 2005-06-08
Posts: 9
Posted: Fri, 2005-08-12 04:25

Nevermind, figured it out - turns out it is as simple as {$user.userName}