2011-04-18, 02:13 PM
2011-04-18, 02:24 PM
UPDATE mybb_users SET usergroup=X WHERE uid=Y
X is the GID of the usergroup and Y is the UID of the user.
2011-04-18, 03:18 PM
You taking it wrong I guess.
I am saying I wanna MASS move users from one usergroup to other.
I got about 50 users that are supposed to be moved to normal group, I guess this is for a specific user as it indices UID.
I am saying I wanna MASS move users from one usergroup to other.
I got about 50 users that are supposed to be moved to normal group, I guess this is for a specific user as it indices UID.
2011-04-18, 03:24 PM
UPDATE mybb_users SET usergroup=X WHERE usergroup=Y
X is the GID of the usergroup you want to move them into and Y is the GID of their original usergroup.
2011-04-18, 03:50 PM
Sure, I would try it out later, thanks.
2011-04-18, 04:15 PM
Instead of a Usergroup you can move UIDs from one Usergroup to another, you just need to describe those IDs in an array like this;
You need to Change 1,2,3,4 to the UserIDs you wish to Change their Usergroup to
UPDATE `mybb_users` SET `usergroup` = 'X' WHERE `uid` IN (1,2,3,4);
You need to Change 1,2,3,4 to the UserIDs you wish to Change their Usergroup to
X
. Where X is your New Usergroup.2011-04-18, 04:24 PM
(2011-04-18, 04:15 PM)Yaldaram Wrote: [ -> ]Instead of a Usergroup you can move UIDs from one Usergroup to another, you just need to describe those IDs in an array like this;It would be again manual work to find and add those UIDs, instead if I run this:
UPDATE `mybb_users` SET `usergroup` = 'X' WHERE `uid` IN (1,2,3,4);
You need to Change 1,2,3,4 to the UserIDs you wish to Change their Usergroup toX
. Where X is your New Usergroup.
UPDATE mybb_users SET usergroup=X WHERE usergroup=Y
The users of the group 1 would be moved to group 2.
Am I correct?
2011-04-18, 04:25 PM
Yes, that's the query I gave you. It works. I've tested it.
2011-04-27, 06:43 AM
Great, that did its work.