Merge branch 'BF-3725' of /home/git/repositories/brainfood/ofbiz-directcontrolservlet
Showing
1 changed file
with
5 additions
and
3 deletions
... | @@ -189,13 +189,14 @@ public class DirectControlServlet extends HttpServlet { | ... | @@ -189,13 +189,14 @@ public class DirectControlServlet extends HttpServlet { |
189 | ) | 189 | ) |
190 | ); | 190 | ); |
191 | 191 | ||
192 | if (authTokenEntity != null && | 192 | if (authTokenEntity != null) { |
193 | authTokenEntity.get("userLoginId") != null) { | 193 | String userLoginId = authTokenEntity.getString("userLoginId"); |
194 | if (UtilValidate.isNotEmpty(userLoginId)) { | ||
194 | GenericValue userLogin = EntityUtil.getFirst( | 195 | GenericValue userLogin = EntityUtil.getFirst( |
195 | delegator.findList("UserLogin", | 196 | delegator.findList("UserLogin", |
196 | EntityCondition.makeCondition("userLoginId", | 197 | EntityCondition.makeCondition("userLoginId", |
197 | EntityOperator.EQUALS, | 198 | EntityOperator.EQUALS, |
198 | authTokenEntity.get("userLoginId")), | 199 | userLoginId.toLowerCase()), |
199 | null, null, null, true)); | 200 | null, null, null, true)); |
200 | if (userLogin != null) { | 201 | if (userLogin != null) { |
201 | context.put("userLogin", userLogin); | 202 | context.put("userLogin", userLogin); |
... | @@ -207,6 +208,7 @@ public class DirectControlServlet extends HttpServlet { | ... | @@ -207,6 +208,7 @@ public class DirectControlServlet extends HttpServlet { |
207 | } | 208 | } |
208 | } | 209 | } |
209 | } | 210 | } |
211 | } | ||
210 | 212 | ||
211 | Debug.logInfo("USERLOGIN " + context.get("userLogin") + " AUTHTOKEN " + authToken, module); | 213 | Debug.logInfo("USERLOGIN " + context.get("userLogin") + " AUTHTOKEN " + authToken, module); |
212 | 214 | ... | ... |
-
Please register or sign in to post a comment