[support] displaying who you are logged in as
Néstor
rotsen at gmail.com
Mon Nov 30 19:34:52 UTC 2009
Hi Andy,
I used your script to display the user that is logged in a block
but some how is displays other user.
When I go to the http://drupla/user link it shows the correct user but the
scripts that added as a block shows a different user:
<?php global $user;
<?php if ($user->uid): ?>
Welcome <b><?php print $user->name; ?></b>
<?php else: ?>
<a href="<?php print base_path() ?>user/" >Log in /
register</a>
<?php endif; ?>
I can tell you that I am using automatically log in with webserver_auth
The correct user is logged in but the small script show the wrong user
do you have any idea?
I try different ways to display the correct user in the Welcome Block but it
does not display the correct user in the block
Thanks,
Néstor :-)
On Sat, Oct 10, 2009 at 12:02 PM, andy baxter <
andy at earthsong.free-online.co.uk> wrote:
> 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
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20091130/7b66eda8/attachment.html
More information about the support
mailing list