name = $name; } function put_in_group($group) { $this->groups[$group->name] = $group; } function is_in_group($group_name) { if (array_key_exists($group_name, $this->groups)) { return TRUE; } foreach ($this->groups as $g) { if ($g->is_in_group($group_name)) { return TRUE; } } return FALSE; } function in_groups() { $result = array(); foreach ($this->groups as $g) { $result[] = $g->name; $result = array_merge($result, $g->in_groups()); } return $result; } } class User extends Groupable { static $default_users = array('w2mllogout', 'w2mlanon', 'w2mlwrong', 'w2mlnolog', 'w2mlunknown', 'w2mlnopwd'); public $password = NULL; function __construct($name = NULL) { parent::__construct($name); } } class Group extends Groupable { function __construct($name = NULL) { parent::__construct($name); } } ?>