public function compareUserGroups(Userinfo $userinfo, $usergroups) {
		if (!is_array($usergroups)) {
			$usergroups = array($usergroups);
		}
		$correct = false;

		$count = 0;
		if (count($usergroups) == count($userinfo->groups)) {
			foreach ($usergroups as $group) {
				if (in_array($group, $userinfo->groups, true)) {
					$count++;
				}
			}
			if (count($userinfo->groups) == $count) {
				$correct = true;
			}
		}

		return $correct;
	}