RE: checkRight function on the LiveUser object
"Jan Bolmeson" <[email protected]>
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
How can we get so totally different values for UserA?? I also recreated the Database from the demodata. I have attached a xml-document with my DB-dump over some of the tables that are interesting. Could you verify some random values? So that we are completely sure that we are using the same base-data for comparison? I have removed all liveuserfiles, downloaded new ones and then moved them into their correct places. //jan ____________________________________________ Jan Bolmeson, Civilingenjör epost: ([email protected]) mobil: 0735 12 86 18 | Digitalt visitkort (vCard) Fernebrant & Ivtaco Mediaproduktion Kristianstadgatan 41B | 214 35 MALMÖ tfn: 040 30 11 88 | http://www.ivtaco.se -----Original Message----- From: [email protected] [mailto:[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) } I am at a loss at this point. I have no idea whats going on. I deleted my database, recreated it with the demo data and got the above results. Only possible but unlikely reason is that I have a slightly modified MDB2 version installed. So the last thing to do is dive into the LiveUser source and check whats going on inside the mapUser() method. That method will call the readUserRight() method, which will in turn call the readGroups() and readGroupRights() methods. If you debug these methods make sure that you are always looking into the Complex.php first, the Medium.php second and lastly in the Simple.php when you are looking for the implementation of a method. Sorry that I seem to be unable to locate the issue :-( regards, Lukas Smith [email protected] _______________________________ BackendMedia www.backendmedia.com [email protected] Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07 _______________________________________________ LiveUser mailing list [email protected] http://mailman.21st-hq.de/mailman/listinfo/liveuser _______________________________________________ LiveUser mailing list [email protected] http://mailman.21st-hq.de/mailman/listinfo/liveuser
xml-dump.txt
(text/plain, 6.3 KB)
<?xml version="1.0" encoding="utf-8" ?>
<!--
-
- phpMyAdmin XML Dump
- version 2.6.0-beta2
- http://www.phpmyadmin.net
-
- Host: localhost
- Generation Time: Jun 20, 2005 at 06:25 PM
- Server version: 5.0.1
- PHP Version: 5.0.4
-->
<!--
- Database: `liveusertest`
-->
<liveusertest>
<!-- Table liveuser_grouprights -->
<liveuser_grouprights>
<group_id>1</group_id>
<right_id>3</right_id>
<right_level>3</right_level>
</liveuser_grouprights>
<liveuser_grouprights>
<group_id>2</group_id>
<right_id>3</right_id>
<right_level>2</right_level>
</liveuser_grouprights>
<liveuser_grouprights>
<group_id>3</group_id>
<right_id>2</right_id>
<right_level>1</right_level>
</liveuser_grouprights>
<!-- Table liveuser_groups -->
<liveuser_groups>
<group_id>1</group_id>
<group_type>0</group_type>
<group_define_name>GROUP1</group_define_name>
<is_active>Y</is_active>
<owner_user_id>0</owner_user_id>
<owner_group_id>0</owner_group_id>
</liveuser_groups>
<liveuser_groups>
<group_id>2</group_id>
<group_type>0</group_type>
<group_define_name>GROUP2</group_define_name>
<is_active>Y</is_active>
<owner_user_id>0</owner_user_id>
<owner_group_id>0</owner_group_id>
</liveuser_groups>
<liveuser_groups>
<group_id>3</group_id>
<group_type>0</group_type>
<group_define_name>GROUP3</group_define_name>
<is_active>Y</is_active>
<owner_user_id>0</owner_user_id>
<owner_group_id>0</owner_group_id>
</liveuser_groups>
<!-- Table liveuser_groupusers -->
<liveuser_groupusers>
<perm_user_id>1</perm_user_id>
<group_id>1</group_id>
</liveuser_groupusers>
<liveuser_groupusers>
<perm_user_id>2</perm_user_id>
<group_id>2</group_id>
</liveuser_groupusers>
<liveuser_groupusers>
<perm_user_id>2</perm_user_id>
<group_id>3</group_id>
</liveuser_groupusers>
<liveuser_groupusers>
<perm_user_id>3</perm_user_id>
<group_id>2</group_id>
</liveuser_groupusers>
<liveuser_groupusers>
<perm_user_id>4</perm_user_id>
<group_id>3</group_id>
</liveuser_groupusers>
<!-- Table liveuser_peoples -->
<liveuser_peoples>
<authuserid>185cd5095e899ab43a225e42d7232807</authuserid>
<handle>userA</handle>
<passwd>098f6bcd4621d373cade4e832627b4f6</passwd>
<owner_user_id>2003</owner_user_id>
<owner_group_id>0</owner_group_id>
<lastlogin>2005-06-20 18:23:58</lastlogin>
<isactive>1</isactive>
</liveuser_peoples>
<liveuser_peoples>
<authuserid>11551a03b7de857163fd2e519c16a960</authuserid>
<handle>userB</handle>
<passwd>098f6bcd4621d373cade4e832627b4f6</passwd>
<owner_user_id>2003</owner_user_id>
<owner_group_id>0</owner_group_id>
<lastlogin>2005-06-20 17:53:03</lastlogin>
<isactive>1</isactive>
</liveuser_peoples>
<liveuser_peoples>
<authuserid>7ddf260b66b9a5c182a91a413f1aa461</authuserid>
<handle>userC</handle>
<passwd>098f6bcd4621d373cade4e832627b4f6</passwd>
<owner_user_id>2003</owner_user_id>
<owner_group_id>0</owner_group_id>
<lastlogin>2005-06-20 17:53:28</lastlogin>
<isactive>1</isactive>
</liveuser_peoples>
<!-- Table liveuser_perm_peoples -->
<liveuser_perm_peoples>
<perm_user_id>1</perm_user_id>
<auth_user_id>c14cbf141ab1b7cd009356f555b607dc</auth_user_id>
<auth_container_name>1</auth_container_name>
<perm_type>1</perm_type>
</liveuser_perm_peoples>
<liveuser_perm_peoples>
<perm_user_id>2</perm_user_id>
<auth_user_id>185cd5095e899ab43a225e42d7232807</auth_user_id>
<auth_container_name>0</auth_container_name>
<perm_type>0</perm_type>
</liveuser_perm_peoples>
<liveuser_perm_peoples>
<perm_user_id>3</perm_user_id>
<auth_user_id>11551a03b7de857163fd2e519c16a960</auth_user_id>
<auth_container_name>0</auth_container_name>
<perm_type>0</perm_type>
</liveuser_perm_peoples>
<liveuser_perm_peoples>
<perm_user_id>4</perm_user_id>
<auth_user_id>7ddf260b66b9a5c182a91a413f1aa461</auth_user_id>
<auth_container_name>0</auth_container_name>
<perm_type>0</perm_type>
</liveuser_perm_peoples>
<!-- Table liveuser_right_implied -->
<liveuser_right_implied>
<right_id>2</right_id>
<implied_right_id>1</implied_right_id>
</liveuser_right_implied>
<liveuser_right_implied>
<right_id>3</right_id>
<implied_right_id>2</implied_right_id>
</liveuser_right_implied>
<!-- Table liveuser_rights -->
<liveuser_rights>
<right_id>1</right_id>
<area_id>1</area_id>
<right_define_name>NEW</right_define_name>
<has_implied>N</has_implied>
</liveuser_rights>
<liveuser_rights>
<right_id>2</right_id>
<area_id>1</area_id>
<right_define_name>CHANGE</right_define_name>
<has_implied>Y</has_implied>
</liveuser_rights>
<liveuser_rights>
<right_id>3</right_id>
<area_id>1</area_id>
<right_define_name>DELETE</right_define_name>
<has_implied>Y</has_implied>
</liveuser_rights>
<!-- Table liveuser_userrights -->
<liveuser_userrights>
<perm_user_id>2</perm_user_id>
<right_id>1</right_id>
<right_level>3</right_level>
</liveuser_userrights>
<liveuser_userrights>
<perm_user_id>3</perm_user_id>
<right_id>1</right_id>
<right_level>3</right_level>
</liveuser_userrights>
<liveuser_userrights>
<perm_user_id>3</perm_user_id>
<right_id>2</right_id>
<right_level>3</right_level>
</liveuser_userrights>
<liveuser_userrights>
<perm_user_id>4</perm_user_id>
<right_id>1</right_id>
<right_level>3</right_level>
</liveuser_userrights>
<liveuser_userrights>
<perm_user_id>4</perm_user_id>
<right_id>2</right_id>
<right_level>3</right_level>
</liveuser_userrights>
<liveuser_userrights>
<perm_user_id>4</perm_user_id>
<right_id>3</right_id>
<right_level>3</right_level>
</liveuser_userrights>
</liveusertest>