Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
00f43e1af0132daaa0e693b91aa26d38f6c2053f
1 parent
bb07129e
to control develop env do not use session
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
library/Action/AbstractAction.php
library/Action/AbstractAction.php
View file @
00f43e1
...
...
@@ -302,20 +302,19 @@ class AbstractAction extends Controller_Abstract
if
(
!
$this
->
_uid
)
{
$cookie
=
$this
->
getCookie
(
'_UID'
);
if
(
!
empty
(
$cookie
))
{
$uid
=
0
;
$cookieList
=
explode
(
'::'
,
$cookie
);
if
(
isset
(
$cookieList
[
1
])
&&
is_numeric
(
$cookieList
[
1
]))
{
$uid
=
$cookieList
[
1
];
if
(
$useSession
)
{
$token
=
$this
->
getSession
(
'_TOKEN'
);
if
(
$token
===
Helpers
::
makeToken
(
$cookieList
[
1
]))
{
$this
->
_uid
=
$cookieList
[
1
];
}
}
else
{
$this
->
_uid
=
$cookieList
[
1
];
}
$this
->
_uname
=
$cookieList
[
0
];
$this
->
_vip
=
$cookieList
[
2
];
}
// 服务端比较
if
(
$useSession
&&
$uid
)
{
$token
=
$this
->
getSession
(
'_TOKEN'
);
if
(
$token
===
Helpers
::
makeToken
(
$uid
))
{
$this
->
_uid
=
$uid
;
}
}
}
}
return
$this
->
_uid
;
...
...
Please
register
or
login
to post a comment