public function __construct($id = 0) { parent::__construct($id); if (is_numeric($this->gid)) { $this->gid = array($this->gid); } $this->spGroups(); /* include default visitor permissions */ $this->gid[] = 0; $this->parentGids(); Sobi::Trigger('UserGroup', 'Appoint', array($id, &$this->gid)); }
public function __construct($id = 0) { parent::__construct($id); $this->gid[] = 0; // this array is really a bad joke :( foreach ($this->groups as $index => $value) { if (is_string($index) && !is_numeric($index)) { $this->gid[] = $value; $this->usertype = $index; } else { $this->gid[] = $index; $this->usertype = $value; } } $this->spGroups(); /* include default visitor permissions */ $this->parentGids(); Sobi::Trigger('UserGroup', 'Appoint', array($id, &$this->gid)); }