6 Aug
1999
6 Aug
'99
3:53 p.m.
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.
The more preferred way is to use AUTHENTICATED_USER.getUserName(), since more complex User Folders (UserDb's, LDAP User Folders, etc) might construct the user from different attributes. There are some basic methods defined on the BasicUser object (from which most AUTH_USER's are derived) for getting the user name, roles, roles in context, etc.