LiveUser_Admin getUsers help needed
| From: | Dan Herman | Date: | Wed, 21 Feb 2007 21:20:19 +0000 |
| Subject: | LiveUser_Admin getUsers help needed | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-26629@lists.php.net to get a copy of this message | ||
Hi, I'm new to LiveUser and LiveUser_Admin so please bear with me.
I'm trying to get the user rights assigned to a specific user in the system. I can get the current logged on users rights with no problem. But when I try to get the rights of some other user, that is not logged on, I end up getting the rights of the user who is logged on. Here is the code I am using:
$filters =
array(
'filters' => array(
'perm_user_id' => $userID
), 'inherited' => 1,
'implied' => 1,
'rekey' => 1, 'select' => 'all'
);
$found = $admin->getUsers($filters);
$daRights = $admin->perm->getRights();
if ($found) {
for($x=0;$x<count($daRights);$x++) {
$aRight = $daRights[$x]['right_define_name'];
$aRightID = $daRights[$x]['right_id']; if($usr->checkRight($aRightID)) $rightNames[] = $aRight; }
}
//var_dump($rightNames);
return $rightNames;
I'm sure I'm doing something wrong, so any help would be greatly appreciated.
thanks
--
Dan Herman