[ic] if statements that check who's logged in.

jojo@buchonline.net jojo@buchonline.net
Fri, 2 Feb 2001 09:42:04 +0100 (CET)


On  2 Feb, Cameron Germein wrote:
> i've scanned throug the docs, and found that i can do this:
> 
> [if value username =~ /^guest/i]
> [include guestleft]
> [else]
> [include left]
> [/else]
> [/if]
> 
> and it works. except for the fact that when i log out and the back in again,
> it doesnt change the value in username, which causes the clause checking to
> fail :) So i decided, i'd try it with data session username, as such:
> 
> [if data session username =~ /^guest/i]
> [include guestleft]
> [else]
> [include left]
> [/else]
> [/if]
> 
> except that it doesnt work :) doing a [data session username] returns the
> right value so like... what am i doing wrong here? :) surely people have
> gotten this working before in an easy and straightforward manner - i assumed
> what i found in the docs would work, but it turns out it doesnt do exactly
> what i was planning... :)

Try [if-data ...] .... [/if-data] or use

[seti sessionuser][data session username][/seti]
[if scratch sessionuser =~ /^guest/i]

instead.

Joachim


-- 
Hans-Joachim Leidinger
buch online                 jojo@buchonline.net
Munscheidstr. 14            FAX: +49 209 1671441
45886 Gelsenkirchen         FAX: 0209 1671441