preg_match('/^[a-z0-9_\-]+$/', $g) ); return !empty(array_intersect($userGroups, self::REQUIRED_GROUPS)); } }