Browse Source

禁言设置

lizhen_gitee 1 năm trước cách đây
mục cha
commit
76ba4b03ee
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      application/admin/model/User.php
  2. 1 1
      application/common/library/Auth.php

+ 1 - 1
application/admin/model/User.php

@@ -231,7 +231,7 @@ class User extends Model
 
     protected function setJinyantimeAttr($value)
     {
-        return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
+        return $value === '' ? 0 : ($value && !is_numeric($value) ? strtotime($value) : $value);
     }
 
 

+ 1 - 1
application/common/library/Auth.php

@@ -705,7 +705,7 @@ class Auth
         //用户权限
         $userinfo['power'] = Db::name('user_power')->where('user_id',$this->id)->find();
 
-        //禁言时间,0不禁,-1永久,>0封禁截止时间
+        //禁言时间,0不禁,>0封禁截止时间
         $userinfo['is_jinyan'] = $userinfo['jinyantime'] > time() ? 1 : 0;
 
         return $userinfo;