XF 2.0 Upgraded accounts not downgrading when the upgrade expires

marshreef

Member
Not sure what is going on. Maybe I don't understand but I was under the impression that if I upgraded a user account via upgrades->action->manually upgrade user and put an end date on it then that account would be removed from the upgraded group associated with that upgrade after the end date.

But that does not seem to be happening.

Our user accounts were rather messed up after migrating from VB to XF 1.5

A lot of the accounts that were "Supporting Members" on the VB side ended up with a XF primary group set to "Supporting Member" - gid 38 rather than "Registered" - gid 2 and having an active upgrade in place with the secondary group set to 38.

So using xenforo mass update I set the users that had a primary group of "Supporting Member" - gid 38 to "Registered" gid 2. I then took those users and manually upgraded them via upgrades->action->manually upgrade user and put an end date equal to when their upgrade was set to expire in VB.

What I'm observing however is there is an entry made in "expired user upgrades" but the user's account is still in that upgraded group 38.

Any idea on how to correct?
 
hmmm... is the problem due to rows being missing from xf_user_group_change?

If I do
select count(user_id) from xf_user u where secondary_group_ids like '%38%'
I get 254.

If I then do:
select count(user_id) from xf_user u where secondary_group_ids like '%38%' and not exists (select * from xf_user_group_change a where u.user_id=a.user_id)
I get 71.

So that means 71 user_id's that are in the upgraded group '38' don't have a corresponding row in xf_user_group_change?

Is that what is causing the issue?

If so can I manually insert rows into xf_user_group_change with the appropriate data for those 71 user_ids?

my rows look like
user_idchange_keygroup_ids
15​
userUpgrade-1
38​
135​
userUpgrade-2
38​

Where upgrade 1 is our individual membership and 2 is family. Which brings up another question but I will start a separate thread for that.
 
Top Bottom