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

XF 1.1 Set user to watch all thread they have started

Discussion in 'XenForo Questions and Support' started by Nudaii, Dec 19, 2012.

  1. Nudaii

    Nudaii Well-Known Member

    I have just moved from MyBB to Xenforo and i need to set it so my account watches every thread it had started (to get alerts from them)

    is there a query to do this?
     
    erich37 likes this.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    UPDATE xf_user_option
    SET default_watch_state = 'watch_email';
    
    Or:

    Code:
    UPDATE xf_user_option
    SET default_watch_state = 'watch_no_email';
    
    Depending on if you want emails too.

    edit - note that this preference is not retroactive to existing threads.
     
    1 person likes this.
  3. CyclingTribe

    CyclingTribe Well-Known Member

    TBH Jake, I think that's what he's really asking for - is there a query to "watch" all threads started/posted in - for a specific user account, or would that be too complex/intensive?

    Cheers,
    Shaun :D
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Code:
    INSERT INTO xf_thread_watch (user_id, thread_id, email_subscribe)
    	SELECT user_id, thread_id, 0
            FROM xf_thread
    ON DUPLICATE KEY UPDATE
    	email_subscribe = VALUES(email_subscribe);
    
    That will add a watch record for the author of every existing thread (no emails).
     

Share This Page