diff --git a/services/src/main/java/org/fao/geonet/api/users/UsersApi.java b/services/src/main/java/org/fao/geonet/api/users/UsersApi.java index c23134054ec..f590b1945fd 100644 --- a/services/src/main/java/org/fao/geonet/api/users/UsersApi.java +++ b/services/src/main/java/org/fao/geonet/api/users/UsersApi.java @@ -636,10 +636,7 @@ public ResponseEntity updateUser( if (securityProviderConfiguration == null || securityProviderConfiguration.isUserGroupUpdateEnabled()) { setUserGroups(user, groups); } - - user = userRepository.save(user); - setUserGroups(user, groups); - + List userGroups = userGroupRepository.findAll(UserGroupSpecs .hasUserId(user.getId()));