From 7403f226b1c7e84f91d0dde7a5f6be375c764d06 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 6 Nov 2019 16:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=99=BB=E5=BD=95=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Sdk/Controller/UserController.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Application/Sdk/Controller/UserController.class.php b/Application/Sdk/Controller/UserController.class.php index de0a92a8..1736a933 100644 --- a/Application/Sdk/Controller/UserController.class.php +++ b/Application/Sdk/Controller/UserController.class.php @@ -28,6 +28,14 @@ class UserController extends BaseController $this -> set_message(1001, "fail", "登录数据不能为空"); } + + $ip = get_client_ip(); + $device_bans_ip = M('device_bans','tab_')->where(['tag' => $ip,'type' => 2])->find(); + $device_bans_num = M('device_bans','tab_')->where(['tag' => $user['device_number'],'type' => 1])->find(); + if(!empty($device_bans_ip) || !empty($device_bans_num)){ + $this->set_message(1004, "fail", "用户已被禁用"); + } + /*是否开启Ucenter*/ if (C('UC_OPEN') == 1) { $userApi = new MemberApi();