lizhen_gitee před 10 měsíci
rodič
revize
463ea7bac1
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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('性别错误');