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

XF 1.5 Modified User Upgrade not expiring properly

Discussion in 'Troubleshooting and Problems' started by Beanjam, Feb 21, 2016.

  1. Beanjam

    Beanjam Active Member

    I have a User Upgrade that originally promoted the user to only one secondary group.

    Recently I added another secondary group (2 groups in total) to the upgrade, and manually added all currently upgraded users to that new group as well.

    I noticed when upgrades are expiring they are being removed from the original group, but are not removed from that additional group I added them to, even though it's in the upgrade settings.

    Is there anything I can do to make this happen automatically?
  2. Mike

    Mike XenForo Developer Staff Member

    Since you manually added the group, it's not recorded as being a change made by the upgrade so it won't be removed automatically. Unfortunately, the only real way to sort that involves a downgrade and a re-upgrade.
  3. Beanjam

    Beanjam Active Member

    Is there a way to properly batch downgrade/upgrade?

    Or is there a database edit I can do to record the change?

    If not, perhaps I'll attempt to make a cron job to clean this up nightly. It's such a simple process to manually batch update them, but I can't see a easy way to schedule something like that.
  4. Beanjam

    Beanjam Active Member

    It looks like the upgrade group data is stored in the xf_user_group_change table, is that correct? In that case, will changing the group_ids on the appropriate user_ids & change_keys (userUpgrade-#) fix the downgrading problem?

    I can see users in there since the changes came in that have the additional group listed, so assume all I need to do is make the other previous upgrades the same.
  5. Mike

    Mike XenForo Developer Staff Member

    That's correct and if you manually put them in the group and change that, it will likely solve the issue. (Though that's not going to be an approach I would officially recommend.)
    Beanjam likes this.
  6. Beanjam

    Beanjam Active Member

    Thank you, I'll take a backup and then test one user first before doing the whole lot.

Share This Page