The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Splitting up banned users.
My forum has been private for a very long time and we are going to open registration back up soon. We used too ban people if they were inactive, so we would do a mass move into an inactive usergroup.
We ran into some forum trouble and in the end it has resulted in our inactive users and our actually banned users being in the same usergroup; Banned. The banned people have ban reasons if you click on their profiles but the inactive do not, is there a way maybe with an sql query to move everyone with a ban reason into another group? Thanks |
#2
|
|||
|
|||
I don't know the table structure off the top of my head but yes, it would be possible. If you can post your table structure we could help further.
|
#3
|
|||
|
|||
The code below is untested so make sure you have a backup of your database.
I'm not sure you could mass move those without a "reason", I think you could use "NULL" as the "reason" in the code below. What the code below does is move all users matching the "reason" so you'd have to repeat the code for each "reason" you have used in banning people. Since the code uses the wildcard % you can use a partial "reason" if you wanted. You'll have to create another banned user group if you haven't already, and make note of it's usergroupid #. Also if you're using a prefix you will have to add that (IE vB_userban instead of just userban) Code:
UPDATE userban SET usergroupid = newusergroupid#here WHERE reason LIKE %reasonhere% |
Благодарность от: | ||
MagicPID |
#4
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|