1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Change members to Bounced with SQL query

Discussion in 'XenForo Questions and Support' started by Andy.N, Dec 31, 2014.

  1. Andy.N

    Andy.N Well-Known Member

    Suppose I have a large list of bounced email addresses from my newsletter provider, and those are registered members on my forum.
    I'd like to use that CSV file and run a SQL query on the XF data to mass change every member to Bounced state.

    The CSV file will contain a couple of thousand email addresses.

    What would be the most efficient way to do this?
    Tks
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You could create a small script which would loop through the array of email addresses, setting the state to 'bounced'.
     
  3. Andy.N

    Andy.N Well-Known Member

    Is there a simple sql query where I can try to apply this to a couple of email address at once?
    Tks
     
  4. Andy.N

    Andy.N Well-Known Member

    If I want to change one account with a specific email address, which field and table in database I need to change?
    Many thanks
     
  5. Andy.N

    Andy.N Well-Known Member

  6. Andy.N

    Andy.N Well-Known Member

    Code:
    update `xf_user`
    set user_state = 'email_bounce'
    where email IN ('email1@domain.com', 'email2@domain.com')
     
    eva2000 and Vitor Dos Reis like this.
  7. Vitor Dos Reis

    Vitor Dos Reis Active Member

    Perfect, thanks!
     

Share This Page