You could have better performance using a filter instead of:
IF $user.class = "user"

search on the keywords LDAP filter for examples
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.