With Kyle's assistance I am proposing the following SQL script to add a user to an Agora group:
Code to add user to agora group with group_id=GID (GID should be an integer number - check table jos_agora_groups for your specific agora group) with role_id=RID (RID should be an integer number - check jos_agora_roles for your specific role - usually role_id of 2 is used for member)
[code:1]
INSERT INTO `#__agora_user_group` ( `user_id`, `group_id`, `role_id` ) VALUES ( ( SELECT `id` FROM `#__agora_users` WHERE `jos_id` = [user_id] ), 'GID', 'RID' )
[/code:1]
and remove code should look like:
[code:1]
DELETE FROM `#__agora_user_group` WHERE ( (`group_id` = 'GID') AND (`role_id` = 'RID') AND (`user_id` = (SELECT `id` FROM `#__agora_users` WHERE `jos_id` = [user_id] ) ) )
[/code:1]
Please backup and test first.
Post edited by: nant, at: 2009/12/22 17:55