Re: LiveUser: Assign group to logged-out user?

From: Date: Sun, 03 Dec 2006 19:29:59 +0000
Subject: Re: LiveUser: Assign group to logged-out user?
References: 1 2 3 4 5  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25967@lists.php.net to get a copy of this message
Hinnerk Voss wrote:
- not-logged-in user has rights RIGHT_1 and RIGHT_3
ok .. so why dont you just make RIGHT_1 and RIGHT_3 constants or elements in an array that you can configure to be null. That is what I do.
Thanks, that works for me at the moment. Anyway, it would be fine to have a group for logged-out users since setting the constants to 0 and assigning rights to a group are done in two different processes and unique identifiers aren't still unique. When I simply want to move a null-right I have to change the constants in the code instead of easily reassign to another group. And it assumes that all other logged-in users have these rights, too. E.g. what about right REGISTRATION_PROCESS_VIEW for logged-in users when I want to hide it from them?
I think a cleaner solution for you is to create a fallback auth container to which anyone automatically authenticates as the user "guest". You can assign this user rights and groups. Of course at that point the user is considered to be loggedin, but you can add in a simple check to find out if its your guest user or not. regards, Lukas

« previous php.pear.general (#25967) next »