When I dump the $visitor variable and view the site logged out, the user state is returned as valid. I was trying to stop guests and unactivated users from viewing things, with something like:
And I realised that the $user variable isn't available in the area I want it (returns null when I dump it).
Which brings me to this: Why is the user state for non-logged in users set to valid? Can't it be set to guest or something, or perhaps no user state at all?
Code:
<xen:if is="!{$visitor.user_id} AND {$user.user_state} == 'valid'">
//code
</xen:if>
And I realised that the $user variable isn't available in the area I want it (returns null when I dump it).
Which brings me to this: Why is the user state for non-logged in users set to valid? Can't it be set to guest or something, or perhaps no user state at all?