登录处理
This commit is contained in:
@@ -10,14 +10,14 @@ class UserToken extends Model
|
||||
public function check_login_token($token)
|
||||
{
|
||||
if (empty($token)) {
|
||||
return ['code' => 301, 'msg' => '登录失效', 'data' =>null];
|
||||
return ['code' => 301, 'msg' => '登录失效!', 'data' =>null];
|
||||
}
|
||||
$user_token = $this->where('token', $token)->find();
|
||||
if (empty($user_token)) {
|
||||
return ['code' => 301, 'msg' => '登录失效', 'data' => null];
|
||||
return ['code' => 301, 'msg' => '登录失效!!', 'data' => null];
|
||||
}
|
||||
if ($user_token['expiretime'] < time()) {
|
||||
return ['code' => 301, 'msg'=> '登录失效', 'data' => null];
|
||||
return ['code' => 301, 'msg'=> '登录失效!!!', 'data' => null];
|
||||
}
|
||||
|
||||
$block1 = db::name('block')->where(['type' => 1,'type_text' => $user_token['user_id']])->find();
|
||||
|
||||
Reference in New Issue
Block a user