LiveUser_Admin: getRights() query

From: Date: Tue, 19 Sep 2006 22:05:53 +0000
Subject: LiveUser_Admin: getRights() query
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25175@lists.php.net to get a copy of this message
Using LiveUser, I can assign rights to groups then check the rights against a logged-in user by simply doing, // $lu = logged in LiveUser object // $right_id = ID of right required $allowed = $lu->checkRight($right_id) ; I'd like to be able to use LiveUser_Admin to check the rights of another user, so as to build an interface that lets me show what rights a user has etc. I would like the code below to return an array of the user's rights inherited from his group memberships. But I just get an empty array, no matter what. I based this code on the example3 docs. // $lua is a LiveUser_Admin object // $user_id now points to another user's perm_user_id - also tried using auth_user_id $params = array( 'filters' => array( 'right_id' => $right_id, 'perm_user_id' => $user_id ) ); $result = $lua->perm->getRights($params) ; We're not assigning rights to individual users ... is that what I'm missing? Is there a "and_yo_groups_too" argument I need? Thanks!

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