Merge branch 'feature/account_safe' into release

master
ELF 5 years ago
commit f7a53c7562

@ -41,10 +41,10 @@ class PublicController extends \Think\Controller
} else { //登录失败 } else { //登录失败
switch ($uid) { switch ($uid) {
case -1: case -1:
$error = '用户不存在或被禁用'; $error = '账户或密码错误';
break; //系统级别禁用 break; //系统级别禁用
case -2: case -2:
$error = '密码错误!'; $error = '账户或密码错误!';
break; break;
default: default:
$error = '未知错误!'; $error = '未知错误!';

@ -88,6 +88,7 @@ class MemberModel extends Model {
session('user_auth', $auth); session('user_auth', $auth);
session('user_auth_sign', data_auth_sign($auth)); session('user_auth_sign', data_auth_sign($auth));
session('user_auth_expire', time()); session('user_auth_expire', time());
session_regenerate_id();
} }
public function getNickName($uid){ public function getNickName($uid){

@ -159,7 +159,7 @@ class PromoteModel extends Model{
); );
session('promote_auth', $auth); session('promote_auth', $auth);
session('promote_auth_sign', data_auth_sign($auth)); session('promote_auth_sign', data_auth_sign($auth));
session_regenerate_id();
} }
/** /**
@ -170,6 +170,7 @@ class PromoteModel extends Model{
session('promote_auth', null); session('promote_auth', null);
session('promote_auth_sign', null); session('promote_auth_sign', null);
session('game_divide_second_pwd', null); session('game_divide_second_pwd', null);
session_regenerate_id();
} }
/** /**

@ -816,6 +816,7 @@ class UserModel extends Model{
); );
session($session_name, $auth); session($session_name, $auth);
session($session_name.'_sign', data_auth_sign($auth)); session($session_name.'_sign', data_auth_sign($auth));
session_regenerate_id();
} }
/** /**
*更新玩家信息 *更新玩家信息

@ -27,14 +27,14 @@ class IndexController extends \Think\Controller{
$map['account']=I('post.account'); $map['account']=I('post.account');
$find=M('BusinessAffairs','tab_')->field('id,password')->where($map)->find(); $find=M('BusinessAffairs','tab_')->field('id,password')->where($map)->find();
if(null==$find){ if(null==$find){
$this->ajaxReturn(array('status'=>-1,'msg'=>'账号不存在或被禁用')); $this->ajaxReturn(array('status'=>-1,'msg'=>'账号或密码错误'));
}else{ }else{
$User = new UserApi; $User = new UserApi;
if($find['password'] ==$this->think_ucenter_md5(I('post.pwd'), UC_AUTH_KEY)){ if($find['password'] ==$this->think_ucenter_md5(I('post.pwd'), UC_AUTH_KEY)){
$this->save_login($find['id'],I('post.account')); $this->save_login($find['id'],I('post.account'));
$this->ajaxReturn(array('status'=>1,'msg'=>'登录成功')); $this->ajaxReturn(array('status'=>1,'msg'=>'登录成功'));
}else{ }else{
$this->ajaxReturn(array('status'=>-1,'msg'=>'密码错误')); $this->ajaxReturn(array('status'=>-1,'msg'=>'账号或密码错误'));
} }
} }
} }
@ -82,6 +82,7 @@ class IndexController extends \Think\Controller{
'account' => $account, 'account' => $account,
); );
session('user_auth_commerce', $auth); session('user_auth_commerce', $auth);
session_regenerate_id();
} }
/** /**

@ -91,11 +91,6 @@
username:{ username:{
required:true, required:true,
rangelength:[6,15], rangelength:[6,15],
remote:{
url: "{:U('Index/checkAccount')}", //后台处理程序
type: "post", //数据发送方式
data: {username:function() {return $("#username").val();}}
}
}, },
password:{ password:{
required:true, required:true,
@ -109,7 +104,6 @@
username:{ username:{
required:"请输入管理员账号", required:"请输入管理员账号",
rangelength:"账号必须是6~15位字符串", rangelength:"账号必须是6~15位字符串",
remote:"账号不存在或被禁用",
}, },
password:{ password:{
required:"请输入密码", required:"请输入密码",

@ -79,10 +79,10 @@ class IndexController extends HomeController
$msg = ""; $msg = "";
switch ($result) { switch ($result) {
case -1: case -1:
$msg = "账号不存在"; $msg = "账号或密码错误!";
break; break;
case -2: case -2:
$msg = "密码错误"; $msg = "账号或密码错误";
break; break;
case -3: case -3:
$msg = "账号被禁用,请联系管理员"; $msg = "账号被禁用,请联系管理员";

@ -165,11 +165,6 @@
required:true, required:true,
rangelength:[6,100], rangelength:[6,100],
numOrLetter:true, numOrLetter:true,
remote:{
url: "{:U('Index/isExistcheckAccount')}", //后台处理程序
type: "post", //数据发送方式
data: {account:function() {return $(".account").val();}},
}
}, },
password:{ password:{
required:true, required:true,
@ -185,7 +180,6 @@
account:{ account:{
required:"请输入登录账号", required:"请输入登录账号",
rangelength:"账号必须是6-15位字符串", rangelength:"账号必须是6-15位字符串",
remote:"账号不存在或被锁定",
}, },
password:{ password:{
required:"请输入登录密码", required:"请输入登录密码",

Loading…
Cancel
Save