• 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

Shyuan

Well-known member
#1
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. :)
 

Mike Edge

Well-known member
#2
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. :)
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;
 

Shyuan

Well-known member
#3
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? :)
 

Mike Edge

Well-known member
#4
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? :)
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.
 

Brogan

XenForo moderator
Staff member
#5
You can't use direct queries to add users to user groups as the permission sets won't be updated correctly.