Browse Source

绑定条件调整

zhangxiaobin 1 năm trước cách đây
mục cha
commit
950d776082
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      application/api/controller/User.php

+ 4 - 4
application/api/controller/User.php

@@ -1139,8 +1139,8 @@ class User extends Api
                 throw new Exception(__('Mobile is incorrect'));
             }
             $where['mobile'] = $mobile;
-            $where['id'] = ['!=',$this->auth->id];
-            $where['status'] = ['!=','new'];
+            $where['id'] = ['neq',$this->auth->id];
+            $where['status'] = ['neq','new'];
             $userData = model('User')->where($where)->find();
             if (!empty($userData)) {
                 $this->error('该手机号已被其他用户绑定');
@@ -1202,8 +1202,8 @@ class User extends Api
                 throw new Exception('已经绑定了微信号');
             }
             $where['openid'] = $openid;
-            $where['id'] = ['!=',$this->auth->id];
-            $where['status'] = ['!=','new'];
+            $where['id'] = ['neq',$this->auth->id];
+            $where['status'] = ['neq','new'];
             $userData = model('User')->where($where)->find();
             if (!empty($userData)) {
                 throw new Exception('该微信号已被其他用户绑定');