| Mitch Sellers wrote
After adding the role to the user, you will need to additionally clear the user cache. You can do this by a call to ClearUserCache. it is inside the DotNetNuke.Common.Utilities namespace, I believe under the DataCache object.
If you can't find it, just drop me an e-mail to msellers@iowacomputergurus.com and I'll send off a code sample.
|
Mitch,
Do you know if this will work for getting rid of the delay that occurs when a user pays subscription through PayPal and is redirected back to the site?
Ex: New user registers, and their 'Registered Users' account is created and they are logged into the site. They are then automatically directed to PayPal to complete payment for subscription. Once payment is received, they are added to the "Paid Members" role group (via DNN core PayPal handlers) which gives them access to the 'protected' areas of the site. The only problem is that there is a 1-2 minute delay for the user cache to be erased before they can access the 'protected' area -- when they get back to the site, they are actually IN the "Paid Members" role group, but don't have access until their cache is updated.
I'm thinking that by throwing the "ClearUserCache" in the post-paypal handler, their info would be updated with the more current 'Paid Members' access. Does the 'ClearUserCache' go deep enough to do this? Does it log them out of the site?
Thanks,
CJ