XF 1.4 User Upgrades Import

Floyd R Turbo

Well-known member
I'm doing a DNN -> XF conversion and I'm in the final stages. I have an existing membership structure with expiration dates and I am able to build the xf_user_upgrade_active table manually and import it, no problem. The issue is that the upgrade automatically adds a user to the user group "Paid Member" when you add a user manually or if they purchase the upgrade, but there I cannot seem to find a cron that I can run or a cache that I can rebuild to cause a member who had an upgrade added through SQL to be added to this group. Can this be done this way or am I stuck manually adding each member to the group after uploading the table?
 
It's really more than that. You can't just add the user to the group as there are a number of other tables involved, most notably the user group change log table. I could really only recommend upgrading the users via the control panel (or with full code to trigger the built in methods).
 
Well, I'm kind of stuck doing what I can do. For instance, I had to manually re-build the columns in the xf_user table by pulling apart the MSSQL table for user group membership and then uisng Excel, DigDB and Notepad++ to form it into an importable .CSV file as I described in this thread

https://xenforo.com/community/threads/importing-user-groups-and-user-group-members.81167/

And this worked, I did this on a dry-run conversion 6 months ago and no problems. But I never did the user upgrades. I guess I'll have to do it the hard way if there is no simple way to run a job that looks at the users with upgrades and checks to make sure they are in the user group. I thought it would be sort of like the user group promotions where it would check "if user has paid upgrade, add to user group" but I guess that's the point of the user upgrade function....
 
With promotions, it actually checks "do they meet the criteria". If you were to actually give a user a promotion (in the log table), it wouldn't add anything as it thought the user already had it. That's roughly what you're doing by inserting the upgrade directly.
 
Yeah, I figured that, but I was looking for a more automatic way of creating all the upgrades/dates...oh well

If I had figured this out in advance, I would have narrowed the user group membership down to only the 'active' paid members - the table I was pulling all that from had 700+ people in the group, plus an expiration date, so I would have had to re-do that whole operation just to cause 230 people to show up right.

Instead I just batch updated everyone out of the group them manually added them all, only a few hundred so it only took a few hours.
 
Top Bottom