74559e91 by Andreyev Oleg

Lower case user login id when looking for UserLogin (Ref. #4079)

1 parent 50cfb506
......@@ -189,13 +189,14 @@ public class DirectControlServlet extends HttpServlet {
)
);
if (authTokenEntity != null &&
authTokenEntity.get("userLoginId") != null) {
if (authTokenEntity != null) {
String userLoginId = authTokenEntity.getString("userLoginId");
if (UtilValidate.isNotEmpty(userLoginId)) {
GenericValue userLogin = EntityUtil.getFirst(
delegator.findList("UserLogin",
EntityCondition.makeCondition("userLoginId",
EntityOperator.EQUALS,
authTokenEntity.get("userLoginId")),
userLoginId.toLowerCase()),
null, null, null, true));
if (userLogin != null) {
context.put("userLogin", userLogin);
......@@ -207,6 +208,7 @@ public class DirectControlServlet extends HttpServlet {
}
}
}
}
Debug.logInfo("USERLOGIN " + context.get("userLogin") + " AUTHTOKEN " + authToken, module);
......