Announcement

Collapse
No announcement yet.

Mass change usergroup based on condition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ED195KW
    replied
    Yep, thanks Floris, will do!

    Leave a comment:


  • Floris
    replied
    Strong advise: http://www.vbulletin.com/go/backup

    make a backup of your forum before you do any database alterations.
    Last edited by Floris; Wed 28 Nov '07, 1:26am.

    Leave a comment:


  • Jose Amaral Rego
    replied
    How to Reduce Spam and Registration Bots or prune by older date join and or inactivity.

    You can run that query from your admin area.
    AdminCP > Maintenance > Execute SQL Query > Manual Query:
    Code:
    UPDATE user SET usergroupid = 8
    WHERE username LIKE '%123456%'
    Is this not even a slower way to get rid of users?
    WHERE userid = 'variable'
    Last edited by Jose Amaral Rego; Wed 28 Nov '07, 12:14am.

    Leave a comment:


  • ED195KW
    replied
    Ah... First Name is a custom field that we created...

    So the query would look more like:
    Code:
    variable = "SELECT userid FROM userfield
    WHERE field8 LIKE '%123456%'"
    
    UPDATE user SET usergroupid = X
    WHERE userid = 'variable'
    of course this needs to be a script of some sort?

    Leave a comment:


  • ED195KW
    replied
    But that query selects users that have the username that is similar to '123456'? I need the users that have the first name that is similar to '123456'. Little bit more difficult?

    Leave a comment:


  • Jose Amaral Rego
    replied
    The second option sends users with simular name = 123456 to banned area and then you can prune from that usergroup area.

    Leave a comment:


  • ED195KW
    replied
    Thanks Hose - I guess I could just prune users with no posts - but was hoping to use some of the details of the banned users for my spam counter-measures...

    Leave a comment:


  • Jose Amaral Rego
    replied
    You could just prune users with no post

    # X = Banned Usergroup
    # 123456 = simular username
    Code:
    UPDATE user SET usergroupid = X
    WHERE username LIKE '%123456%'

    Leave a comment:


  • ED195KW
    started a topic Mass change usergroup based on condition

    Mass change usergroup based on condition

    On our forum we have a lot of spammers registered with the first name set to '123456'. For whatever reason there are ALOT (1400+) that have never posted anything (but given they have a first name of 123456 are assumed to be spam accounts).

    As there are so many, it would be very tedious to move them individually into the Banned Users usergroup, so I was wondering if there was a way I could do it with a script?

    I was thinking of a script that searched all registered users for first name of 123456 and set their usergroup to banned users (usergroup id=8).

    Ideas?

Related Topics

Collapse

Working...
X