PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Authentication » LiveUser_Admin » Bug #3874

removeUserFromGroup() Removes all assignments

Details

Submitted2005-03-18 18:26 UTC
Frombenpjohnson at gmail dot com
Assignedlsmith
StatusClosed
PackageLiveUser_Admin
PHP Version5.0.3
OSWindows XP
Roadmaps(Not assigned)

Comments

[2005-03-18 18:26 UTC] benpjohnson at gmail dot com

Description:
------------
package version: 0.2.0

The removeUserFromGroup() function does not seem to take the group_id filter into account and all groups assignments for that the user are deleted.

Reproduce code:
---------------
$admin->perm->removeUserFromGroup(array('group_id' => $group_id,'perm_user_id' => $perm_user_id));

Expected result:
----------------
User with id $perm_user_id is removed from group: $group_id

Actual result:
--------------
All group assignments for that user are removed

[2005-03-23 18:48 UTC] smith at backendmedia dot com

Yes we have a conceptual problem here.

$filters = $this->_makeRemoveFilter($filters, 'perm_user_id', 'getGroups');

returns only the 'perm_user_id' returned by passing the filters to getGroups() ...

I think we probably need to remove the entire _makeRemoveFilter() business for all cases where we are removing people from relationship tables and the user may simply only set filters on the given relation..

[2005-03-24 16:33 UTC] smith at backendmedia dot com

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.