RE: checkRight function on the LiveUser object
"Jan Bolmeson" <[email protected]>
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: [email protected] [mailto:liveuser- > [email protected]] On Behalf Of Lukas Smith > Sent: den 20 juni 2005 19:51 > To: LiveUser-DevList > Subject: Re: [LiveUser] checkRight function on the LiveUser object > > Jan Bolmeson wrote: > > > [Jan Bolmeson] > > But as it seems we do get the same result on example4. And the client > > returns correct data for grouprights as of now - which was one of the > > problems. The second remaining problem is to try to fix so that it works > for > > "UserRights" as well. > > Ok, so for that you will need to have a look at the readUserRights() > method. Try to debug whats going on there. [Jan Bolmeson] [Jan Bolmeson] The following results and flags show that the user_right is correctly collected from the database and assigned to $this->userRights in Perm::Simple.php::readUserRights() Line 236. What happens with the $this->userRights later? It seems to be registered but it does not reflect in $LU->getProperty('rights'): array(1) { 2 => string(1) 3 } Or $LU->getProperty('userRights'): array(0) Any pointer on where to continue searching? --------------------------------- Flags and results --------------------------------- Perm::simple.php:175 Perm::Storage::DB.php:139 Array ( [perm_user_id] => 3 [perm_type] => 3 ) Perm::simple.php:177 Perm::simple.php:189 going for readRights() Perm::Medium.php::readRights() Line 109 going for ReadUserRights() Perm::Complex.php::readUserRights() Line 130 going for parent::readUserRights() Perm::Simple.php::readUserRights() Line 233 Perm::Storage::DB.php::readUserRights() Line 165 Perm::Storage::Db.php :: readUserRights() line 180 SELECT R.right_id, U.right_level FROM liveuser_rights R, liveuser_userrights U WHERE R.right_id = U.right_id AND U.perm_user_id = '3' Result: of $query Array ( [3] => 1 ) Perm::Simple.php::readUserRights() Line 236 $this->userRights is: Array ( [3] => 1 ) Perm::Complex.php::readUserRights() Line 132 executed parent Going for impliedrights