summaryrefslogtreecommitdiff
path: root/actions/logout.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-05-25 22:47:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-05-25 22:47:23 -0400
commit76aa85fe5ef408cecf7c40c0c56d58ff9ac9fcbb (patch)
treef2bd52d08e421f934bc8466ab1ecb4facbbcc6a5 /actions/logout.php
parentb140bcdee4b1f4c8f2f34a89a9c5c51e7ecfe826 (diff)
parent68d90bcab04713d53cf3731d45729a617e68a2fa (diff)
Merge branch '0.8.x' into stats
Conflicts: README
Diffstat (limited to 'actions/logout.php')
-rw-r--r--actions/logout.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/actions/logout.php b/actions/logout.php
index 9f3bfe247..c34b10987 100644
--- a/actions/logout.php
+++ b/actions/logout.php
@@ -70,10 +70,20 @@ class LogoutAction extends Action
if (!common_logged_in()) {
$this->clientError(_('Not logged in.'));
} else {
- common_set_user(null);
- common_real_login(false); // not logged in
- common_forgetme(); // don't log back in!
+ if (Event::handle('StartLogout', array($this))) {
+ $this->logout();
+ }
+ Event::handle('EndLogout', array($this));
+
common_redirect(common_local_url('public'), 303);
}
}
+
+ function logout()
+ {
+ common_set_user(null);
+ common_real_login(false); // not logged in
+ common_forgetme(); // don't log back in!
+ }
+
}