I have in my Master Page 2 Repeaters to show 2 different menus for 2 different user groups. I have also a web part which changes the current user role from one to the other one when click on a button – this works correctly and I can see in debug as well as in db that the roles changed correctly.
CMS.SiteProvider.UserInfoProvider.AddUserToRole(user.UserName, "SponsorAsParticipant", CMS.CMSHelper.CMSContext.CurrentSiteName.ToLower());
CMS.SiteProvider.UserInfoProvider.RemoveUserFromRole(user.UserName, "Sponsor", CMS.CMSHelper.CMSContext.CurrentSiteName.ToLower());
However repeaters do not switch: after switching role I should see the second (different) repeater. Cash of the repeaters is set to 0.
What am I doing wrong?