how to check if this user is logged in?

how to check if this user is logged in?

Sunday 10 July 2005 3:02:22 am - 2 replies

Author Message

Pål J Didriksen

Sunday 10 July 2005 5:48:07 am

Hi!

I think you need to fetch the current user first, for example:

{default current_user=fetch('user','current_user')}

Then you can show different content, depending on wether the user is logged in or not:

{default current_user=fetch('user','current_user')}
{section show=$current_user.is_logged_in}
    Hello, {$current_user.contentobject.name}, you are now logged in!   
{section-else}
    Please log in first.
{/section}
{/default}

Hope this works for you too!

Pål J.

zaxofeel .v

Monday 11 July 2005 12:49:28 am

thank you very much dear friend
the line of fetching the current user was what i am missing
problem solved.
thanks again :)

You must be logged in to post messages in this topic!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.