示例#1
0
 /**
  *	Checks is user in group?
  *
  *	@param 		mixed		$group			group aliases
  *	@param 		bool		$ssl_check		check is group for ssl connection only
  *	@return		bool
  */
 public function isUserInGroup($group, $ssl_check = TRUE)
 {
     if (!$this->id()) {
         return FALSE;
     }
     if (!is_array($group)) {
         $group = array($group);
     }
     $ssl = $ssl_check + 0;
     foreach ($group as $alias) {
         if (!isset($this->_groupCheck[$ssl][$alias])) {
             $this->_groupCheck[$ssl][$alias] = $this->_mapper->checkUserGroup($this, $alias, $ssl_check);
         }
         if ($this->_groupCheck[$ssl][$alias]) {
             return TRUE;
         }
     }
     return FALSE;
 }