How to view if a user is connected

max2817
max2817's picture

Joined: 2008-07-30
Posts: 28
Posted: Wed, 2008-08-27 10:17

Hi everybody,
I would like to verify if someone is logged in and change a menu accordingly. Is it possible to know what code I can use to verify this ?

Cordialy,

Max2817

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-08-28 10:53

In a template:

{if $user.isRegisteredUser}
.
.
.
{/if}
 
max2817
max2817's picture

Joined: 2008-07-30
Posts: 28
Posted: Thu, 2008-08-28 11:59

Thanks, I know now but it's in a php page and I include the Gallery by embedding.
edit: I have found it, by isset($_COOKIE['GALLERYSID']).

Cordialy,

Max2817

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-08-28 13:26

That's not a general solution as there are many situations where a guest user gets a session id as well.