diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-05-17 00:05:53 -0400 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-05-17 00:05:53 -0400 |
commit | a325144fa0ba769de1cdb554cac04e0116912b66 (patch) | |
tree | b36b33c91330cf80ffcfc090ef52be4df03c63e3 /actions | |
parent | f3ea79a12a7bdf0d4efcd7eb706d25ae81b7fad9 (diff) | |
parent | 811cef10083f8b7824b2fd8140f940bf13b54c8d (diff) |
Merge branch '0.8.x' of git@gitorious.org:~evan/laconica/dev into 0.8.x
Diffstat (limited to 'actions')
-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! + } + } |