diff --git a/UI/WebServerResources/SOGoRootPage.js b/UI/WebServerResources/SOGoRootPage.js index b6ea6be28..14b834ab5 100644 --- a/UI/WebServerResources/SOGoRootPage.js +++ b/UI/WebServerResources/SOGoRootPage.js @@ -20,7 +20,8 @@ function onLoginClick(event) { var password = $("password").value; if (userName.length > 0) { - if (loginSuffix && loginSuffix.length > 0 + if (typeof(loginSuffix) != "undefined" + && loginSuffix.length > 0 && !userName.endsWith(loginSuffix)) userName += loginSuffix; var url = $("connectForm").getAttribute("action"); @@ -39,7 +40,7 @@ function onLoginCallback(http) { if (http.readyState == 4) { if (isHttpStatus204(http.status)) { var userName = $("userName").value; - if (loginSuffix + if (typeof(loginSuffix) != "undefined" && loginSuffix.length > 0 && !userName.endsWith(loginSuffix)) userName += loginSuffix;