Commit 99016f70 authored by wangjiangze's avatar wangjiangze

更新登录账号/密码加密规则查询条件

parent 166414f4
......@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment