The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
I'm not an expert on doing things through the ACP so there could be a way that I don't know about. But looking at the code, it looks like to add someone to a secondary group you'd just have to add the new groupid to the membergroupid field for that user in the 'user' database table. (membergroupid is a text field that's a comma-separated list of secondary groups).
So what you could do is add everyone who's in one secondary group to another secondary group by doing a mysql query like this: Code:
UPDATE user SET membergroupids = CONCAT(membergroupids, ',10') WHERE FIND_IN_SET(9, membergroupids) AND NOT FIND_IN_SET(10, membergroupids) // added this - see below Then when that's done you can just delete the old group in the ACP. I've tried this on a test site, but of course it might be a good idea to have a database backup before doing this, just in case. Also if you wanted you could try it first with one or a few users by adding " AND userid IN(1, 2, 3)" to the end of the query (putting the userids you want in place of 1,2,3 of course ![]() ...and of course you can't delete the old group before you've run the query for all users. ETA: I added "AND NOT FIND_IN_SET(10, membergroupids)" to the above code to avoid listing the same group twice in case a user is already in the second group. But if you've already done it I'm pretty sure it's OK because when it checks if a user is in a group it doesn't matter if it's there twice, and when it removes the user from a group it seems to handle the possibility of it being listed more than once. |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|