diff --git a/Mage.Server/src/main/java/mage/server/Session.java b/Mage.Server/src/main/java/mage/server/Session.java index 67610f4abe..1ed486fece 100644 --- a/Mage.Server/src/main/java/mage/server/Session.java +++ b/Mage.Server/src/main/java/mage/server/Session.java @@ -184,8 +184,8 @@ public class Session { boolean reconnect = false; if (user == null) { // user already exists user = UserManager.getInstance().findUser(userName); - // TODO: Remove this check since now we do a user authentication. - if (user.getHost().equals(host)) { + // If authentication is not activated, check the identity using IP address. + if (ConfigSettings.getInstance().isAuthenticationActivated() || user.getHost().equals(host)) { user.updateLastActivity(null); // minimizes possible expiration this.userId = user.getId(); if (user.getSessionId().isEmpty()) {