I am looking for a way of mass adding all users to a secndary usergroup. The usergroup number is 12. I can do it in mysql if required just need to know the mysql command to do.
Announcement
Collapse
No announcement yet.
mass add all users to another usergroup
Collapse
X
-
Secondary groupids are stored in a comma list, so they are hard to manipulate with a query.
If none of the users belong to another secondary group, then this query should work:
Code:UPDATE user SET membergroupids = X
Code:UPDATE user SET membergroupids = CONCAT( '' , membergroupids , ',X' )
I haven't tested this, so backup first and use with caution. Also, these queries do not check if the user is already a member of X.
Hopefully that helps. I don't know of a more universal query for this.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment