From e5bd6c0c670f5ad5f309b63d11da6cc35122958b Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 8 Mar 2008 16:04:29 +0000 Subject: crude login and logout functionality git-svn-id: https://code.elgg.org/elgg/trunk@118 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/login.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 actions/login.php (limited to 'actions/login.php') diff --git a/actions/login.php b/actions/login.php new file mode 100644 index 000000000..2dc3371ad --- /dev/null +++ b/actions/login.php @@ -0,0 +1,42 @@ +url; + } + + // If all is present and correct, try to log in + if (!empty($username) && !empty($password)) { + $result = login($username, $password, $persistent); + } + + // Set the system_message as appropriate + + if ($result) { + system_message("You have been logged in."); + } else { + system_message("We couldn't log you in. Make sure your details are correct and please try again."); + } + + header("Location: {$passthru}"); + exit; + +?> \ No newline at end of file -- cgit v1.2.3