Пример #1
0
 /**
  * @name acl_fetchRole
  * @package 从数据取出该用户的权限
  * @return array
  */
 public function acl_fetchRole()
 {
     $uid = parent::acl_getUid();
     $format = "SELECT g.permissions,g.subpermiss FROM " . DB_PRE_CORE . "user_info u, " . DB_PRE_CORE . "group g where u.types=%d and g.types=%s and u.gid = g.id and u.uid=%d ";
     $sql = sprintf($format, DB_TYPE_DIFFERENCE, DB_TYPE_DIFFERENCE, $uid);
     $res = $this->FetchArray($sql);
     $ses = $this->acl_getSessionInfo();
     $ses['role'] = $res;
     $this->acl_setSessionInfo($ses);
 }