Hi there, I was experimenting with the role assignment feature yesterday. I have the roles "full membership" and "featured membership" set up as products. The full membership role has various options - 1 month, 3 months, 6 months, etc. I've set it up to do the role assignment on "Pending" so that I can test. This seems to work really well, aside from one thing. The problem is, this morning when I logged in, the role expiry for all users seems to have vanished. They still have the assigned roles, but no expiry dates. So it seems the role expiry dates that were assigned the previous day have been lost. Indeed, they don't appear to be listed in the uc_roles_expirations table.
When I login to a user that added roles yesterday and try to add a new membership, the order goes through but the role expiry table isn't updated.
When I create a new user and add a role, everything works fine.
Your attention to this issue would be much appreciated. Please let me know if you need further information.
Thanks,
Peter.
Comment | File | Size | Author |
---|---|---|---|
#2 | uc_roles.patch | 524 bytes | Shawn Conn |
Comments
Comment #1
wotstheguts CreditAttribution: wotstheguts commentedFurther information - cron seems to be causing this. I just ran cron manually, and the role expiry table was cleared.
Cheers,
Peter.
Comment #2
Shawn Conn CreditAttribution: Shawn Conn commentedYeah, thanks for point this out this a pretty big bug. I've attached the patch file that you can use to fix the problem. I forgot that the user->roles array is a keyed array and not just a standard array with containing all the role ids for a user's roles. The fix has been committed and will be out in the next release.
Comment #3
wotstheguts CreditAttribution: wotstheguts commentedNo worries, thanks for fixing it so quickly. Installed the patch and all good now.
Cheers,
Peter.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.