Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (52 sloc) 1.38 KB
// $Id$
This page supports the automoderation system
with enabling users to confirm their emails via the web.
This script only need to run on
$_SERVER['BASE_PAGE'] = 'mod.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/';
site_header("Email confirmation");
// Only run on
if ($MYSITE != "") {
echo <<<ERROR
<h1>Email confirmation failed</h1>
<p class="formerror">
This server is not capable of handling email confirmations.
// These sites are handled by automoderation
$sites = array("", "");
// Get data from the URL
list($none, $site, $token, $sender) = explode("/", $_SERVER["PATH_INFO"]);
// Error in input data
if ($sender == "" || strlen($token) < 32 || !isset($sites[$site])) {
echo <<<ERROR
<h1>Email confirmation failed</h1>
<p class="formerror">
Sorry, the URL is incomplete. Please verify that you used the
complete URL even if it spans multiple lines.
// Data OK, send confirmation mail
else {
"confirm@" . $sites[$site],
"[confirm: $token $sender]",
"From: $sender"
echo <<<THANKS
<h1>Email confirmation successful</h1>
Thanks for confirming your email address. No further
action is required on your part.
Something went wrong with that request. Please try again.