Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-directcontrolservlet
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
74559e91
authored
2014-09-18 15:21:17 +0300
by
Andreyev Oleg
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Lower case user login id when looking for UserLogin (Ref. #4079)
1 parent
50cfb506
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
src/com/brainfood/ofbiz/DirectControlServlet.java
src/com/brainfood/ofbiz/DirectControlServlet.java
View file @
74559e9
...
...
@@ -189,21 +189,23 @@ public class DirectControlServlet extends HttpServlet {
)
);
if
(
authTokenEntity
!=
null
&&
authTokenEntity
.
get
(
"userLoginId"
)
!=
null
)
{
GenericValue
userLogin
=
EntityUtil
.
getFirst
(
delegator
.
findList
(
"UserLogin"
,
EntityCondition
.
makeCondition
(
"userLoginId"
,
EntityOperator
.
EQUALS
,
authTokenEntity
.
get
(
"userLoginId"
)),
null
,
null
,
null
,
true
));
if
(
userLogin
!=
null
)
{
context
.
put
(
"userLogin"
,
userLogin
);
}
if
(
authTokenEntity
!=
null
)
{
String
userLoginId
=
authTokenEntity
.
getString
(
"userLoginId"
);
if
(
UtilValidate
.
isNotEmpty
(
userLoginId
))
{
GenericValue
userLogin
=
EntityUtil
.
getFirst
(
delegator
.
findList
(
"UserLogin"
,
EntityCondition
.
makeCondition
(
"userLoginId"
,
EntityOperator
.
EQUALS
,
userLoginId
.
toLowerCase
()),
null
,
null
,
null
,
true
));
if
(
userLogin
!=
null
)
{
context
.
put
(
"userLogin"
,
userLogin
);
}
// prolong the session
if
(
UtilValidate
.
isNotEmpty
(
checkSessionService
))
{
dispatcher
.
runSync
(
checkSessionService
,
UtilMisc
.<
String
,
Object
>
toMap
(
"authSessionId"
,
authToken
,
"userLogin"
,
userLogin
));
// prolong the session
if
(
UtilValidate
.
isNotEmpty
(
checkSessionService
))
{
dispatcher
.
runSync
(
checkSessionService
,
UtilMisc
.<
String
,
Object
>
toMap
(
"authSessionId"
,
authToken
,
"userLogin"
,
userLogin
));
}
}
}
}
...
...
Please
register
or
sign in
to post a comment