API for add 'secondary_group_ids'

EricB

New member
Hello,

depending the rights in my portal the user should get access to serveral forums.

Is there a API for adding new "secondary_group_ids" to a user?

Or do i have to read the given id´s for a user, walk through an array and check if a id is already existing? And if not, add the ID the die comma-seperated id-list?

Thank you
Eric
 
Thanks, was really easy:

$userModel->addUserGroupChange($UserID, 'unique-key', 6);

Without any save or else!
 
Note, if you manually remove them from the secondary group and do not remove the necessary upgrade record, the function will silently fail and do nothing.
 
Back
Top Bottom