<participant>
	<quickSearch><![CDATA[logoutGoTo]]></quickSearch>
	<insertText location="aboveHTML+8"><![CDATA[<?php
// *** Logout the current user.
$logoutGoTo = "@@redirectPage@@";
if (!isset($_SESSION)) {
  session_start();
}
$_SESSION['@@MM_username@@'] = NULL;
$_SESSION['@@MM_userAuthorization@@'] = NULL;
unset($_SESSION['@@MM_username@@']);
unset($_SESSION['@@MM_userAuthorization@@']);
if ($logoutGoTo != "") {header("Location: $logoutGoTo");
exit;
}
?>]]></insertText>
	<searchPatterns whereToSearch="directive">
		<searchPattern paramNames="redirectPage,MM_username,MM_userAuthorization" isOptional="false" limitSearch="all"><![CDATA[/\/\/ \*\*\* Logout the current user\.(?:\r\n|\r(?!\n)|\n)[ \t]*\$logoutGoTo = "([^\r\n]*?)";(?:\r\n|\r(?!\n)|\n)[ \t]*if \(!isset\(\$_SESSION\)\) \{(?:\r\n|\r(?!\n)|\n)[ \t]*session_start\(\);(?:\r\n|\r(?!\n)|\n)[ \t]*\}(?:\r\n|\r(?!\n)|\n)[ \t]*\$_SESSION\['([^\r\n]*?)'\] = NULL;(?:\r\n|\r(?!\n)|\n)[ \t]*\$_SESSION\['([^\r\n]*?)'\] = NULL;(?:\r\n|\r(?!\n)|\n)[ \t]*unset\(\$_SESSION\['[^\r\n]*?'\]\);(?:\r\n|\r(?!\n)|\n)[ \t]*unset\(\$_SESSION\['[^\r\n]*?'\]\);(?:\r\n|\r(?!\n)|\n)[ \t]*if \(\$logoutGoTo != ""\) \{header\("Location: \$logoutGoTo"\);(?:\r\n|\r(?!\n)|\n)[ \t]*exit;(?:\r\n|\r(?!\n)|\n)[ \t]*\}(?=\r\n|\r|\n|\?>)/]]></searchPattern>
	</searchPatterns>
</participant>
