diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-05-19 14:42:19 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-05-19 14:42:19 -0400 |
commit | 8cc8f9fd0c0ad8d1c38bd0c113f9f0a4d7918256 (patch) | |
tree | 9ff8e6cecfcd1539a2d6772133cd99e7706d94fc /actions/logout.php | |
parent | 99f8501d321ae9d8087abbe6523e28ce5fd095d3 (diff) | |
parent | 09e95cc33fb2228066d524e399bcc549e85eb565 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Conflicts:
config.php.sample
Diffstat (limited to 'actions/logout.php')
-rw-r--r-- | actions/logout.php | 16 |
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! + } + } |