Re: [SMARTY] Question about sessions

From: Date: Wed, 24 Jul 2002 19:51:16 +0000
Subject: Re: [SMARTY] Question about sessions
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5423@lists.php.net to get a copy of this message
I think it probably needs to be this: {if isset($smarty.session.user)} {if $smarty.session.user eq 'admin' } .. {/if} {/if} ----- Original Message ----- From: "Jan Rosier" <rosier@interstroom.nl> To: <smarty-general@lists.php.net> Sent: Wednesday, July 24, 2002 3:47 PM Subject: Re: [SMARTY] Question about sessions > Maybe this is something for you (I didn't test it ;-) ) > > {if isset($smarty.session.user) AND $smarty.session.user eq 'admin'} > .... > {/if} > > Greetings > Jan Rosier > > ----- Original Message ----- > From: "Garland foster" <garland_foster@salutia.com> > To: <smarty-general@lists.php.net> > Sent: Wednesday, July 24, 2002 8:15 PM > Subject: [SMARTY] Question about sessions > > > Hi all, > > I want to know the best solution to check if a session variable is set, if I > use > {if $smarty.session.user eq 'admin'} > Code for admin > {else} > Code for normal users > {/if} > > Then I have a problem if error_reporting is set to all because the index > user cannot be found > in the compiled template. > > Ideas? > > Thanks, > Garland. > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.smarty.general (#5423) next »