diff --git a/Application/Admin/Model/UserModel.class.php b/Application/Admin/Model/UserModel.class.php index e031fb6a..8197b06c 100644 --- a/Application/Admin/Model/UserModel.class.php +++ b/Application/Admin/Model/UserModel.class.php @@ -1051,7 +1051,7 @@ class UserModel extends Model{ } } - public function login_sdk($account,$password,$type=1,$game_id,$game_name,$sdk_version){ + public function login_sdk($account,$password,$type=1,$game_id,$game_name,$sdk_version){ $map['account'] = $account; /* 获取用户数据 */ $user = $this->where($map)->find(); @@ -1077,6 +1077,7 @@ class UserModel extends Model{ $data["login_time"] = NOW_TIME; $data["login_ip"] = get_client_ip(); $data["token"] = $this->generateToken($uid,$account,$password); + $data["user_token"] = $this->generateToken($uid,$account,$password); if($user_fgame_id){ $model->save($data); }else{ diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index 51847098..b5b6e144 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -273,6 +273,7 @@ class UserController extends BaseController "sex" => $user_res["sex"] ? $user_res["sex"] : 0, "is_platform" => $platform, "token" => $result['token'], + "user_token" => $user_res['user_token'], "OTP_token" => think_encrypt(json_encode(array('uid' => $user["user_id"], 'time' => time())), 1), 'is_uc' => 0, "is_open_small_account" => C('IS_OPEN_SMALL_ACCOUNT'),