From 57eb0a289cb55fc0d49b2f3eba5fae8280faeae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20D=C3=A9nari=C3=A9?= Date: Mon, 14 Oct 2024 18:15:54 +0200 Subject: [PATCH] fix: unable to save modification of firstname or lastname - EXO-74782 Before this fix, when user update firstname or lastname in profile, the modification is not saved. This is because in the the profile is uncessessary reloaded from databse before saving the modification The commit ensures to not reload the profil, and save it correctly. Resolves meeds-io/meeds#2490 --- .../java/org/exoplatform/social/rest/impl/user/UserRest.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/component/service/src/main/java/org/exoplatform/social/rest/impl/user/UserRest.java b/component/service/src/main/java/org/exoplatform/social/rest/impl/user/UserRest.java index b0638b42a75..74ab2bdf0df 100644 --- a/component/service/src/main/java/org/exoplatform/social/rest/impl/user/UserRest.java +++ b/component/service/src/main/java/org/exoplatform/social/rest/impl/user/UserRest.java @@ -1146,9 +1146,6 @@ public Response updateUserProfileAttributes(@Context if (!(profileProperty.isMultiValued() || !profileProperty.getChildren().isEmpty())) { updateProfileField(profile, profileProperty.getPropertyName(), profileProperty.getValue(), false); updateProfilePropertyVisibility(profileProperty); - if (profileProperty.getPropertyName().equals(Profile.FIRST_NAME) || profileProperty.getPropertyName().equals(Profile.LAST_NAME) ) { - profile = getUserIdentity(username).getProfile(); - } } else { List> maps = new ArrayList<>(); profileProperty.getChildren().forEach(profilePropertySettingEntity -> {