Ver código fonte

绑定条件调整

zhangxiaobin 1 ano atrás
pai
commit
950d776082
1 arquivos alterados com 4 adições e 4 exclusões
  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('该微信号已被其他用户绑定');