} if ($pass1 != $pass2) { $msg = 'Both passwords must be the same'; return; } if (strlen($email) > 250) { $msg = 'Email address must be under 250 characters'; return; } event::register('USER_REGISTRATION', function ($args = array()) { if ($_SERVER['HTTP_REFERER'] != 'http://lifelitup.com/register.php') { // can't really do much here until the site is live... but it's an example nevertheless. } // give person a badge for registering etc }); $register = $auth->register($email, $pass1); if ($register == true) { $msg = 'You have registered'; event::fire('USER_REGISTRATION'); return; } else { $msg = 'Registration has failed'; return; } } if (isset($_POST['forgotSubmit'])) { $op = $_POST['op']; if ($op !== 'forgot') { die('Unknown request'); } $email = $_POST['email'];