修复部分用户无法登录的BUG
parent
09f87d08d7
commit
d4d10f5309
|
@ -31,14 +31,14 @@
|
|||
//创建token
|
||||
function token($user,$pass){
|
||||
//token生成算法为:用户名 + md5后的密码 + ip + ua
|
||||
$token = $user.$pass.get_ip().get_ua();
|
||||
$token = $user.$pass.get_ua();
|
||||
$token = md5($token);
|
||||
|
||||
return $token;
|
||||
}
|
||||
//判断用户是否登录
|
||||
function is_login($user,$pass){
|
||||
$token = $user.$pass.get_ip().get_ua();
|
||||
$token = $user.$pass.get_ua();
|
||||
$token = md5($token);
|
||||
|
||||
$username = $_COOKIE['user'];
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
$username = $userinfo->username;
|
||||
$password = $userinfo->password;
|
||||
//echo get_ip();
|
||||
$password = $username.$password.get_ip().get_ua();
|
||||
$password = $username.$password.get_ua();
|
||||
$password = md5($password);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue