瀏覽代碼

绑定条件调整

zhangxiaobin 1 年之前
父節點
當前提交
950d776082
共有 1 個文件被更改,包括 4 次插入4 次删除
  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('该微信号已被其他用户绑定');