if (empty($password)) { $msg = 'You need to enter a password'; return; } if (strlen($password) > 72) { $msg = 'The supplied password is too long'; return; } $login = $auth->login($email, $password); if ($login > 0) { $verified = $auth->isVerified($login['id']); if (empty($verified)) { $msg = 'You have not confirmed your email address'; return; } $auth->validateUser($login); event::fire('USER_LOGIN'); if (!empty($dest)) { header('Location: ' . $dest); } else { header("Location: index.php"); } die; } $msg = $login; } if (isset($_POST['register'])) { $op = $_POST['op']; if ($op !== 'new' && $op !== 'login') { die('Unknown request'); }