function getUserGroupIndex(Userinfo $userinfo)
	{
		$index = 0;

		$master = Framework::getMaster();
		if ($master) {
			$mastergroups = Groups::get($master->name);

			foreach ($mastergroups as $key => $mastergroup) {
				if ($mastergroup) {
					if (count($mastergroup) == count($userinfo->groups)) {
						$count = 0;
						foreach ($mastergroup as $value) {
							if (in_array($value, $userinfo->groups, true)) {
								$count++;
							}
						}
						if (count($userinfo->groups) == $count) {
							$index = $key;
							break;
						}
					}
				}
			}
		}
		return $index;
	}