10 Oct
2009
10 Oct
'09
10:02 p.m.
Martin Hooper wrote:
Is there a module that will display the logged in user?
I just added the following code into a suitable place in my page.tpl.php: <?php if ($user->uid): ?> Welcome <?php print $user->name; ?> (<a href="<?php print base_path() ?>logout/" >Log out</a>) <?php else: ?> <a href="<?php print base_path() ?>user/" >Log in / register</a> <?php endif; ?> This prints 'Welcome <user name>' plus a log in /out link. If that's any help? andy