Deleting members from database with a specific email account

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • georgec
    Senior Member
    • Jun 2002
    • 257

    Deleting members from database with a specific email account

    Hi:
    I wish to delete all members that share a particular email account (ie: @yahoo.com). Am I correct I can simply go into phpmyadmin and run the following query:

    Code:
    delete from user where email like "'%@yahoo.com%"
    Is my regular expression correct? Also, is there any other queries I need to run to clean up after deleting members this way?

    Thanks!

    - JavaScript Kit | CSS Drive | CodingForums.com | CodeTricks.com
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24286
    • 6.0.X

    #2
    That will delete any such users yes, however deleting users directrly in the database is not supported. There will almost certainly be unintended consequences.

    You should search for users in the admincp that have that email domain and then delete from there.
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • Paul M
      Former Lead Developer
      vB.Com & vB.Org
      • Sep 2004
      • 9886

      #3
      Just deleting them from user would be a bad and unsupported idea.

      Just create a dummy usergroup that cannot do anything, and move them to that.
      Baby, I was born this way

      Comment

      • georgec
        Senior Member
        • Jun 2002
        • 257

        #4
        Thanks for the response. The problem is there are over 1000 members who are using the same email service (ie: @yahoo.com) and who are spammers that I wish to delete or ban quickly. There doesn't seem to be a way to quickly manipulate members by email address in the user CP, hence the reason I'm asking to do it via a mysql query. Do you have any suggestions in this case?
        - JavaScript Kit | CSS Drive | CodingForums.com | CodeTricks.com

        Comment

        • Paul M
          Former Lead Developer
          vB.Com & vB.Org
          • Sep 2004
          • 9886

          #5
          Do what I said above.

          "Just create a dummy usergroup that cannot do anything, and move them to that. "
          Baby, I was born this way

          Comment

          • djbaxter
            Senior Member
            • Aug 2006
            • 1418
            • 4.2.5

            #6
            Should be
            Code:
            delete * from user where email like '%@yahoo.com'
            or
            Code:
            select * from user where email like '%@yahoo.com'
            will give you a list of usernames
            Psychlinks Web Services Affordable Web Design & Site Management
            Specializing in Small Businesses and vBulletin/Xenforo Forums

            Comment

            • Mark.B
              vBulletin Support
              • Feb 2004
              • 24286
              • 6.0.X

              #7
              A warning to anyone reading...please DO NOT delete users by database query.

              You will break your site, and support won't be able to fix it.

              Both Paul and I have tried to make this clear but it's still being suggested, for some reason.

              MARK.B
              vBulletin Support
              ------------
              My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
              My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...