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

XF 1.3 Set user's registration date to their first post date

Discussion in 'XenForo Questions and Support' started by Valter, Mar 19, 2014.

  1. Valter

    Valter Active Member

    What would be mysql query to set user's registration-date to their first-post-date for usergroup X?

    Many thanks.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    UPDATE xf_user AS u
    SET u.register_date = (
        SELECT p.post_date
        FROM xf_post AS p
        WHERE p.user_id = u.user_id
        ORDER BY p.post_date
        LIMIT 0,1
    WHERE u.user_group_id = 2
    Backup first.
    Valter likes this.
  3. Valter

    Valter Active Member

    Thank You very much. ;)

Share This Page