diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java index 8b6d1277e4..26ebe51ac7 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/services/ce/UserServiceCEImpl.java @@ -715,12 +715,7 @@ public class UserServiceCEImpl extends BaseService @Override public Mono buildUserProfileDTO(User user) { - // For anonymous users, build the profile directly from the in-memory user object - if (user.isAnonymous()) { - return getAnonymousUserProfile(user); - } - // For regular users, proceed with the existing flow Mono userFromDbMono = findByEmail(user.getEmail()).cache(); Mono isSuperUserMono = @@ -760,22 +755,6 @@ public class UserServiceCEImpl extends BaseService }); } - protected Mono getAnonymousUserProfile(User user) { - return this.isUsersEmpty().map(isUsersEmpty -> { - UserProfileDTO profile = new UserProfileDTO(); - profile.setEmail(user.getEmail()); - profile.setUsername(user.getUsername()); - profile.setAnonymous(true); - profile.setEnabled(user.isEnabled()); - profile.setEnableTelemetry(!commonConfig.isTelemetryDisabled()); - profile.setEmptyInstance(isUsersEmpty); - // Intercom consent is defaulted to true on cloud hosting - profile.setIntercomConsentGiven(commonConfig.isCloudHosting()); - - return profile; - }); - } - private EmailTokenDTO parseValueFromEncryptedToken(String encryptedToken) { String decryptString = EncryptionHelper.decrypt(encryptedToken); List nameValuePairs = WWWFormCodec.parse(decryptString, StandardCharsets.UTF_8);