I'm working on a plugin where I hook in at register_addmember_process and query against an external datasource.
Based on the results of the query, I need to add the user to multiple secondary usergroups.
I can add them to a single secondary usergroup like this, where X is the usergroup.
Code:
$userdata->set('membergroupids', X);
What I need to do is be able to add them to usergroups X, Y, and Z, etc...
I'm not quite sure logically how to make this work. If anyone has any tips it would be greatly apprecaited.
Regards,
Bobbo
--------------- Added [DATE]1270569683[/DATE] at [TIME]1270569683[/TIME] ---------------
Nevermind, I figured it out.
I needed to implode my array result first and ensure the values were comma separated before I set the membergroupids.