Browse Source

修复后台Auth的check方法指定uid不生效的BUG

Karson 6 years ago
parent
commit
515f4f78b1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      application/admin/library/Auth.php

+ 2 - 1
application/admin/library/Auth.php

@@ -137,7 +137,8 @@ class Auth extends \fast\Auth
 
     public function check($name, $uid = '', $relation = 'or', $mode = 'url')
     {
-        return parent::check($name, $this->id, $relation, $mode);
+        $uid = $uid ? $uid : $this->id;
+        return parent::check($name, $uid, $relation, $mode);
     }
 
     /**