MyBB Community Forums

Full Version: Mass move users from one usergroup to another?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everyone. I'd like to move users from one specific group to another specific group, could someone please tell me the SQL query to achieve this? (It's the awaiting activation group to the registered members group)

Also I'd like to know what will happen if I delete any user group that already has members in it? Will the members also get deleted or will they just be transferred to the default members group? Lastly how do I remove the additional user group option, it seems that once highlighted it cannot be deselected...

Any help would be highly appreciated.
BUMP.
BUMP.
Query for moving users from specific GID to another GID

Lets wait for the experts' guidance for the other queries Smile
(2011-06-28, 11:13 AM)ranjani Wrote: [ -> ]Query for moving users from specific GID to another GID

Lets wait for the experts' guidance for the other queries Smile

No need, that should work just fine.
Hey!

I'm not the best with SQL, but from what I remember you should be able to change it by something like this in your database via phpMyAdmin:

UPDATE mybb_users SET gid="x" WHERE gid="x"

(Replace the first 'x' with the group you'd like to move them to, and the second 'x' with the group they're currently in all. You can view the GID of the group via your ACP, in the address bar when editing a group).

Also, I'm not certain but I'm pretty sure that deleting a usergroup will not delete the members, it will just set the member to a default such as registered, AFAIK.

Thirdly, try holding down "CTRL" when clicking on a highlighted group from the "Additional Groups" to remove it. Smile



Oh, darn. Seems I was too slow in writing the post and the top posts solve the SQL issue. Blush
You don't need an SQL query to mass move users to a different usergroup - you can do that from the ACP.

Go the Users & Groups tab and next to each user will be a checkbox. Check the box next to the user(s) you want to move, scroll to the bottom of the page, and from the moderation dropdown choose "Change Users' Usergroup".

You can search for users in the ACP and perform this action, for example, if they meet different criteria.
Wouldn't it be easier to do a one-line SQL code than to tick ~100 boxes (depending on the amount of people in the group) and move them? Toungue
Well that depends. If they were all apart of one group, then yes, it probably would be quicker.

If they had different criteria, such as different usergroups or had less than 2 posts and registered recently (or whatever you fancy), just search for the users - crank up the results per page - press search and then hit the select all checkbox to check all users. Toungue
Thank you everyone. I really don't which post to mark as the best answer(they're all good), so I'll leave it this time ;P