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

From: Date: Fri, 01 Dec 2006 11:02:59 +0000
Subject: Re: LiveUser: Assign group to logged-out user?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25951@lists.php.net to get a copy of this message
Thanks for reply, but that's not what I mean. Example: - not-logged-in user has rights RIGHT_1 and RIGHT_3 - logged-in standard user has RIGHT_1, RIGHT_3 and RIGHT_4 - logged-in premium user has RIGHT_1, RIGHT_2, RIGHT_3 and RIGHT_4 I would like to check permission on RIGHT_2: if ($LU->checkRight(RIGHT_2)) { do_something_secret(); } The rights of the logged-out users I want to manage in a group and not in PHP code. So it won't be nesseccary to extra check $LU->isLoggedIn() or $LU->checkRight(0) respectively (as it is the same extra check). That's because maybe I want to grant permissions on RIGHT_2 for all users (logged out, too) later - so I only have to change the group rights then and no code changes are needed. Hope that I explained more precisely ;o) Regards, Hinnerk Lukas Kahwe Smith wrote:
Hinnerk Voss wrote:
Hi, can I assign a group to the logged-out user? I want to define a set of permissions that I always only have to check $LU->checkRight(RIGHT_ID) without extra checking of $LU->isLoggedIn().
if a user is not logged in the following rules will apply: $right_id = null => return true else return false btw .. if you only want to check if a user is logged in .. you can also just pass $right_id = 0 regards, Lukas


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