} } if ($emailAddr) { if (!$pHandler->validateEmailAddress($emailAddr)) { $emailAddr = ''; $statusStr = 'Invalid email'; } } if (!is_numeric($resetPwd)) { $resetPwd = 0; } if ($action && !preg_match('/^[a-zA-Z0-9\\s_]+$/', $action)) { $action = ''; } if ($remMe) { $pHandler->setRememberMe(true); } if ($action == "logout") { $pHandler->reset(); header("Location: ../index.php"); } elseif ($action == "Login") { $password = trim($_POST["password"]); if ($pHandler->authenticate($password)) { if (!$refUrl || strtolower(substr($refUrl, 0, 4)) == 'http' || strpos($refUrl, 'newprofile.php')) { header("Location: ../index.php"); } else { header("Location: " . $refUrl); } } else { $statusStr = 'Your username or password was incorrect. Please try again.<br/> If you are unable to remember your login credentials,<br/> use the controls below to retrieve your login or reset your password.'; }