From 18a2818f4fd2d1c47d4aa9e052fa346beecfd5d2 Mon Sep 17 00:00:00 2001 From: amentis Date: Fri, 21 Jun 2024 16:40:41 +0300 Subject: [PATCH] small fix --- .../main/java/org/opencdmp/service/user/UserServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java b/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java index 94f88743e..45082de90 100644 --- a/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java +++ b/backend/core/src/main/java/org/opencdmp/service/user/UserServiceImpl.java @@ -1026,8 +1026,8 @@ public class UserServiceImpl implements UserService { if (contactInfoEntity != null){ userId = contactInfoEntity.getUserId(); } - if (userId != this.userScope.getUserId()) throw new MyApplicationException("Cannot confirm invitation for different User"); if (userId != null) { + if (!userId.equals(this.userScope.getUserId())) throw new MyApplicationException("Cannot confirm invitation for different User"); UserCredentialEntity userCredential = this.queryFactory.query(UserCredentialQuery.class).disableTracking().userIds(userId).first(); if (userCredential == null) throw new MyApplicationException();