Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHow to refresh the DNN roles??How to refresh the DNN roles??
Previous
 
Next
New Post
1/26/2013 2:33 PM
 

We use to be able to use:

Dnn.User.ClearRoles()

 to force a refresh of the DNN roles of the user.  This was supposed to delete the DNN Portal cookie where the roles were stored.  As long as you redirected to a new DNN page after this code runs it was supposed to cause the Roles to be refreshed from the database.

However, when I attempt to use that API from a Razor Host module on a DNN page, I am told this API has just recently (i.e.; DNN. 6.2) been marked obsolete since DNN roles are supposedly "no longer stored in the DNN Portal cookie".

So how does one force a "role refresh" for the current user from within say a DNN Razor Host model, post DNN 6.2?

Thanks,
Rod

 
New Post
1/29/2013 9:12 AM
 
Hi

To clear login user role from cache use code below.

DotNetNuke.Security.PortalSecurity.ClearRoles();

Thanks,
Sunil Kumar [ DNN Developer, Mindfire Solutions,India ]
 
New Post
1/29/2013 9:36 AM
 

Thanks for your response but that API has been depreicated in DNN 6.2 according to the Visual Studio intellisense.  The reason given is that "roles are no longer stored in a cookie".

Does anybody know the "new" way to clear roles in DNN?

Thanks,
Rod

 
New Post
1/30/2013 5:38 AM
 

There is no need to clear roles in dnn7.  The cookie system is no longer used to hold a cache of the roles data.

 
New Post
1/30/2013 5:56 AM
 
What if i want the user's role list to be reloaded/refreshed on certain event as i m assigning a new role on that event.

Thanks,
Sunil Kumar [ DNN Developer, Mindfire Solutions,India ]
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Getting StartedGetting StartedHow to refresh the DNN roles??How to refresh the DNN roles??


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out