small fix

This commit is contained in:
amentis 2024-06-21 16:40:41 +03:00
parent d2d889f011
commit 18a2818f4f
1 changed files with 1 additions and 1 deletions

View File

@ -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();