Looks like the code below works as far as removing the role from the user, just need to relog the user (commented out line - is that line actually relog the user back to the portal?)
'remove the user from the ACSSurvey Role
Dim objRoleController As New Roles.RoleController
'objRoleController.UpdateUserRole(PortalId, UserId, objRoleController.GetRoleByName(PortalId, "ACSSurvey").RoleID, True)
objRoleController.DeleteUserRole(PortalId, UserId, objRoleController.GetRoleByName(PortalId, "ACSSurvey").RoleID)
'UserController.UserLogin(PortalId, UserInfo, PortalSettings.PortalName, GetIPAddress(), True)
'Remove user from cache
Dim objUser As UserInfo = UserController.GetCachedUser(PortalSettings.PortalId, Context.User.Identity.Name)
If objUser IsNot Nothing Then
DataCache.ClearUserCache(PortalSettings.PortalId, Context.User.Identity.Name)
End If
Thanks,
Val