code: private User updateUserStandard(LdapName originalId, User existingUser) {
          User savedUser = userRepo.save(existingUser);
  
          if(!originalId.equals(savedUser.getId())) {
              // The user has moved - we need to update group references.
              LdapName oldMemberDn = toAbsoluteDn(originalId);
              LdapName newMemberDn = toAbsoluteDn(savedUser.getId());
  
              Collection<Group> groups = groupRepo.findByMember(oldMemberDn);
              updateGroupReferences(groups, oldMemberDn, newMemberDn);
          }
          return savedUser;
      }
docs: Update the user and - if its id changed - update all group references to the user.
  
  @param originalId the original id of the user.
  @param existingUser the user, populated with new data
  
  @return the updated entry