Posted on 12/11/2014 08:18:53
Well, in short it's like below.
I've tried the Dynamicweb.Modules.UserManagement.Group.ClearCache() in VB functions on several places too after I update a user or add or remove one.
(PS: when I specify a specific Group and call ClearCache() on that Group (what I would rather have) I get forced to change it to the global group cache call)
Dynamicweb.Modules.UserManagement.Group.ClearCache(); // clear the cached user groups.
Dynamicweb.Content.Page.UpdateFrontendCache(); // clear the cached permissions on websites and pages
var accessUsers = UserFunctions.GetMyUsers(); // returns a list of Dynamicweb.Modules.UserManagement.User, this list is not changed after adding or removing users (backend is)
if (accessUsers.Any()) {
<do some stuff>
foreach (var subAccount in (accessUsers) {
<print some user values> // these values are not updated after changing the user from the front-end and after page refresh (backend values do)
}
<do some stuff>
}