final User oldUser = userManager.getUser(user.getUserId());
userManager.updateUser(user);
if (oldUser.getStatus() == UserStatus.active && user.getStatus() != oldUser.getStatus()) {
// clear the realm authc caches as user got disabled
eventBus.post(new UserPrincipalsExpired(user.getUserId(), user.getSource()));
}
// then save the users Roles
for (UserManager tmpUserManager : userManagerFacade.getUserManagers().values()) {
// skip the user manager that owns the user, we already did that