diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-08 16:04:29 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-03-08 16:04:29 +0000 |
commit | e5bd6c0c670f5ad5f309b63d11da6cc35122958b (patch) | |
tree | 42ab7df3d0f2b472edba59539ba28823880420fa /actions/logout.php | |
parent | 1739ce16cfa0933a09496f66b014885c281d114a (diff) | |
download | elgg-e5bd6c0c670f5ad5f309b63d11da6cc35122958b.tar.gz elgg-e5bd6c0c670f5ad5f309b63d11da6cc35122958b.tar.bz2 |
crude login and logout functionality
git-svn-id: https://code.elgg.org/elgg/trunk@118 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/logout.php')
-rw-r--r-- | actions/logout.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/actions/logout.php b/actions/logout.php new file mode 100644 index 000000000..c75a7c30e --- /dev/null +++ b/actions/logout.php @@ -0,0 +1,34 @@ +<?php
+
+ /**
+ * Elgg logout action page
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ */
+
+ //delete this
+ require_once('../engine/start.php');
+ global $CONFIG;
+
+ // Log out
+ $result = logout();
+
+ // Set the system_message as appropriate
+
+ if ($result) {
+ system_message("You have been logged out.");
+ } else {
+ system_message("We couldn't log you out. We're not sure why, to be honest. Try again?");
+ }
+
+ //direct to frontpage
+ $url = $CONFIG->url;
+ header("Location: {$url}");
+ exit;
+
+?>
\ No newline at end of file |