aboutsummaryrefslogtreecommitdiff
path: root/actions/logout.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/logout.php')
-rw-r--r--actions/logout.php43
1 files changed, 18 insertions, 25 deletions
diff --git a/actions/logout.php b/actions/logout.php
index 2bcb538de..c48a26b15 100644
--- a/actions/logout.php
+++ b/actions/logout.php
@@ -1,25 +1,18 @@
-<?php
-
- /**
- * Elgg logout action
- *
- * @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/
- */
-
- // Log out
- $result = logout();
-
- // Set the system_message as appropriate
-
- if ($result) {
- system_message(elgg_echo('logoutok'));
- } else {
- system_message(elgg_echo('logouterror'));
- }
-
-?> \ No newline at end of file
+<?php
+/**
+ * Elgg logout action
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+// Log out
+$result = logout();
+
+// Set the system_message as appropriate
+if ($result) {
+ system_message(elgg_echo('logoutok'));
+ forward();
+} else {
+ register_error(elgg_echo('logouterror'));
+} \ No newline at end of file