include('../Code/confHeader.inc');
$Conf -> connect();
//
// In all cases, we need to look up the account information
// to determine if they user is registered
//
if ( IsSet($loginEmail) ) {
$Me -> lookupByEmail($loginEmail, $Conf);
if ( !IsSet($forgot) && IsSet($password)
&& $Me -> valid()
&& $Me -> password == $password) {
$Me -> go("../index.php");
exit;
}
} else {
$Me -> invalidate();
}
?>
$Conf->header("Account Authentication") ?>
if ( IsSet($forgot) ) {
if (! $Me -> valid() ) {
$Conf->errorMsg(
"We did not locate an existing account for $loginEmail. "
. "Click here to return to the "
. " login page to try again. "
);
} else {
$Me -> sendAccountInfo($Conf);
$Conf->confirmMsg(
"The account information for $loginEmail has been retrieved and "
. "sent via email. You can use that information to login. "
. "Click here to return to the login page. "
);
$Me -> invalidate();
}
} else {
//
// Check the password
//
if ($Me -> password != $password) {
$Me -> invalidate();
}
if ( ! $Me -> valid()) {
$Conf->errorMsg(
"That password is not correct. "
. "-or- That email address ($loginEmail) is not registered. "
. "Please return to the login form and "
. "either enter a valid email address or register an account."
);
} else {
$Conf->confirmMsg(
"Welcome " . $Me->fullname() . " "
. "you've successfully logged in.");
print "";
$Conf->textButton("Go to Conference Submission And Review Index", "../index.php");
print "";
//
// Update their visit counts
//
$Me -> bumpVisits($Conf);
//
// Check their roles
//
$Me -> updateContactRoleInfo($Conf);
$Conf->log("Login", $Me);
}
}
?>
$Conf->footer() ?>