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

XF 1.1 Batch Upgrade First 100 Users

Discussion in 'XenForo Questions and Support' started by Shyuan, Aug 29, 2013.

  1. Shyuan

    Shyuan Well-Known Member

    Hi,

    Let's say if I promise my forum members to temporary upgrade them (for one month) from "regular members" usergroup to "supporter" usergroup once we reach 100 members mark, how can I apply it in batch? Apparently if I go to User Upgrades, I can only manually upgrade users one by one.

    Can this be done via database? If yes, can I know how to do it? Any help would be much appreciated.

    Thank you. :)
     
  2. The Forum Heroes

    The Forum Heroes Well-Known Member

    Could use..

    Code:
    update `xf_user_upgrade_active` `user_upgrade_id`=1 where `user_id` <=100;
    update `xf_user_upgrade_active` `start_date`='date-here' where `user_id` <=100;
    update `xf_user_upgrade_active` `end_date`='date-here' where `user_id` <=100;
     
  3. Shyuan

    Shyuan Well-Known Member

    Hi Mike,

    Thanks for the SQL. :) But what format do I use for the date? What if I want it to be 1st Sept 2013 to 30th Sept 2013? Any idea? :)
     
  4. The Forum Heroes

    The Forum Heroes Well-Known Member

    Make a fake account right before you do it and manually add them it then copy the dates to use. IIRC it is in UNIX time not calendar format, so that would be the best solution to get the start and end numbers.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    You can't use direct queries to add users to user groups as the permission sets won't be updated correctly.
     
  6. The Forum Heroes

    The Forum Heroes Well-Known Member


    Hmmm.. I thought when the cron runs it sees the new additions in the table and processes them?
     
  7. Shyuan

    Shyuan Well-Known Member

    @Brogan does this means I have to manually upgrade them from within admin cp?
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

  9. Shyuan

    Shyuan Well-Known Member

    Okay, thank you Brogan and Mike for your help! :)
     

Share This Page