lizhen_gitee 10 tháng trước cách đây
mục cha
commit
463ea7bac1
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      application/api/controller/User.php

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

@@ -2218,9 +2218,9 @@ class User extends Api
     //注册设置性别
     public function setgender() {
         $user_id = $this->auth->id;
-        if (in_array($user_id, [0, 1])) {
+        /*if (in_array($user_id, [0, 1])) {
             $this->error('性别不能修改~');
-        }
+        }*/
         $gender = input('gender', -1, 'intval'); //性别:1=男,0=女
         if (!in_array($gender, [1, 0])) {
             $this->error('性别错误');