At 08:47 AM 8/6/99 +0100, Tony McDonald wrote:
So, I put some logic at the top of standard_html_header like so:
<!--#if "AUTHENTICATED_USER=='AnonUser'"--> <!--#call "RESPONSE.redirect('denied')"--> <!--#/if--> <html> <head> etc etc
And I *still* get the main page showing up and telling me I'm AnonUser (ie the page I get is what I should see if I'm ValidUser).
Does standard_html_header do some other voodoo that isn't plainly obvious?
No. The problem is that: <!--#if "AUTHENTICATED_USER=='AnonUser'"--> Should be: <!--#if "AUTHENTICATED_USER.name=='AnonUser'"--> Because AUTHENTICATED_USER is a user *object*, not a string. The string representation of a user object is its .name attribute, but if you try to just compare a user object to a string, it will always fail.