kentico_helenag
-
10/3/2008 8:17:47 AM
RE:How can I programatically remove user form the role
Hi,
“This membership seems to be permanent.” – do you mean permanent in one session or always?
This assignment is done after every log in, so if you would like not to assign to this role after next log in, you could simply remove the line:
rolesTable["DownloadAccess"] = 0;
and after next log in, the user would be not assigned to any roles.
If you mean removing in one authentication session, you could use for example this code:
Hashtable rolesTable2 = new Hashtable(); string siteName = CMSContext.CurrentSite.SiteName; usr.SitesRoles[siteName.ToLower()] = rolesTable2;
- it assigns no role to user.
If you mean something else, please let us know.
Best regards, Helena Grulichova
|