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 18:04 > To: LiveUser-DevList > Subject: Re: [LiveUser] checkRight function on the LiveUser object > > Jan Bolmeson wrote: > > > Result for userA: > > --------------------------------------------------------------------- > > $LU->getProperty('rights'): > > array(1) { [1]=> string(1) "3" } > > --------------------------------------------------------------------- > > $LU->getProperty('groupRights'): > > NULL > > --------------------------------------------------------------------- > > $LU->getProperty('groupIds'): > > array(0) { } > > --------------------------------------------------------------------- > > $LU->getProperty('userRights'): > > array(1) { [1]=> string(1) "3" } > > end madwax test > > for example I get the following output using the default unchanged > example4: > > var_dump($LU->getProperty('rights')); > array(3) { > [2]=> > int(3) > [3]=> > int(2) > [1]=> > int(3) > } > > var_dump($LU->getProperty('groupRights')); > array(3) { > [2]=> > int(3) > [3]=> > int(2) > [1]=> > int(3) > } > > var_dump($LU->getProperty('groupIds')); > array(2) { > [0]=> > int(2) > [1]=> > int(3) > } > > var_dump($LU->getProperty('userRights')); > array(1) { > [1]=> > int(3) > } > [Jan Bolmeson] Halleluja I now get the following obviously same result as you do. After stepping through almost all functions I saw that the SQL query in the Perm::Storage::Db.php :: readGroups() line 261 did not return any result set due to the "is_active" field which was "Y" and it tried to match on "1". Example 4 obviosuly works. Now the strange part - the above fixed one of the original problems - the one that $LU->checkRight() didn't work for grouprights. Hence my application works for grouprights but not for userrights? And in example 4 both user and grouprights work. Any suggestion? //jan --------------------------------------------------------------------- $LU->getProperty('rights'): array(3) { [2]=> string(1) "1" [3]=> string(1) "2" [1]=> string(1) "3" } --------------------------------------------------------------------- $LU->getProperty('groupRights'): array(2) { [2]=> string(1) "1" [3]=> string(1) "2" } --------------------------------------------------------------------- $LU->getProperty('groupIds'): array(2) { [0]=> string(1) "2" [1]=> string(1) "3" } --------------------------------------------------------------------- $LU->getProperty('userRights'): array(1) { [1]=> string(1) "3" } end madwax test