Re: [LiveUser] Administrating users/groups

From: Date: Wed, 17 Mar 2004 11:17:46 +0000
Subject: Re: [LiveUser] Administrating users/groups
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11350@lists.php.net to get a copy of this message
Jan Tammen wrote:
Bonjour. Since the people working on the LiveUser frontend seem to be rather busy ;-), I'm in the need to get up my own scripts to manage user accounts / groups. Basically I want to be able to manage user-group-relationships, thats all. The included Admin-classes seem to provide everything I need. But let's say I got a mask for updating an user account and I want to change the user's group-membership (e.g. I got a html-select-field with the available groups) -- would I first need to remove the user from all groups he is member of and then adding him to the one(s) I selected? I only found the methods addUserToGroup and removeUserFromGroup in the class LiveUser_Admin_Perm_Container_DB_Complex. Wouldn't it be nice to have some kind of wrapper-method which would put the user into the desired groups and removes all other memberships? sth. like (dummy-code) function assignUserToGroups(integer $auth_user_id, array $group_ids) { removeUserFromAllGroups($auth_user_id); foreach ($group_ids AS $group) {
       addUserToGroup($auth_user_id, $group_id);
} } Or am I missing the point and there is already such a functionality? Merci, Jan. I'm also very interested by an admin frontend (Web or OrientedObject) for LiveUser package.
Maybe it could be possible to contribute ? or maybe it allready exists code doing that somewhere ? Stephane

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