From 61d1aa04d8d44b17bfe6dace90088669fc6c3df8 Mon Sep 17 00:00:00 2001 From: Kyle McFarland Date: Wed, 31 Jan 2018 00:51:07 -0600 Subject: Initial import * Registration system's almost done * Just part way through implementing tasks So not much done yet, but it's a start. --- login.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 login.php (limited to 'login.php') diff --git a/login.php b/login.php new file mode 100644 index 0000000..d310163 --- /dev/null +++ b/login.php @@ -0,0 +1,32 @@ +login($_POST["username"], $_POST["passwd"], $sess_info); + $success_alerts[] = 'Successfully logged in, Continue'; + } catch (UnknownMember $e) { + $danger_alerts[] = "Failed to login, no such user"; + } catch (LoginError $e) { + $danger_alerts[] = "Failed to login, {$e->getMessage()}"; + } +} + +echo $twig->render("login.tmpl", array( + "danger_alerts" => $danger_alerts, + "success_alerts" => $success_alerts, + "sess_info" => $sess_info +)); + +?> -- cgit v1.1