Fix issue with login for new users

This commit is contained in:
George Kalampokis 2020-11-04 16:52:10 +02:00
parent 47d5d8cb9e
commit 70056bd0a9
1 changed files with 4 additions and 2 deletions

View File

@ -119,8 +119,10 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer
.where((builder, root) -> builder.and(builder.equal(root.get("provider"), profile.getProvider().getValue()), builder.equal(root.get("externalId"), profile.getId())))
.getSingleOrDefault());
userInfo = optionalCredential.map(Credential::getUserInfo).orElse(null);
if (userInfo.getUserStatus() == 1) {
userInfo = null;
if (userInfo != null) {
if (userInfo.getUserStatus() == 1) {
userInfo = null;
}
}
//}
if (userInfo == null) {