Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴贤德
SooonerHotel
Commits
99016f70
Commit
99016f70
authored
Dec 23, 2019
by
wangjiangze
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新登录账号/密码加密规则查询条件
parent
166414f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
LoginAction.class.php
SooonerHotel/App/Lib/Action/LoginAction.class.php
+10
-8
No files found.
SooonerHotel/App/Lib/Action/LoginAction.class.php
View file @
99016f70
...
...
@@ -31,10 +31,11 @@ class LoginAction extends Action{
}
if
(
$this
->
check_code
(
$code
))
{
// $where['account'] = $username;
$where
[
md5
(
'account'
)]
=
$username
;
$where
[
'password'
]
=
$password
;
$where
[
'status'
]
=
1
;
$r
=
$UserModel
->
where
(
$where
)
->
find
();
// $where[md5('account')] = $username;
// $where['password'] = $password;
// $where['status'] = 1;
// $r = $UserModel->where($where)->find();
$r
=
$UserModel
->
where
(
"MD5(account)='%s' and `password`='%s' and `status`=%d"
,
$username
,
$password
,
1
)
->
find
();
if
(
$r
)
{
$this
->
remove_limit
();
// session('username', $username);
...
...
@@ -152,10 +153,11 @@ class LoginAction extends Action{
$code
=
I
(
'code'
);
// $where['account'] = $username;
$where
[
md5
(
'account'
)]
=
$username
;
$where
[
'password'
]
=
$password
;
$where
[
'status'
]
=
1
;
$r
=
$UserModel
->
where
(
$where
)
->
find
();
// $where[md5('account')] = $username;
// $where['password'] = $password;
// $where['status'] = 1;
// $r = $UserModel->where($where)->find();
$r
=
$UserModel
->
where
(
"MD5(account)='%s' and `password`='%s' and `status`=%d"
,
$username
,
$password
,
1
)
->
find
();
if
(
$r
)
{
//验证GA
require_once
'./App/PHPGangsta/GoogleAuthenticator.php'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment