From 1d4f1f6bf6bd8313cbb51dbf61d675408171d1b8 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 6 May 2008 11:17:29 -0400 Subject: add standard directories Added some of the standard directories darcs-hash:20080506151729-84dde-563da8505e06a7302041c93ab157ced31165876c.gz --- _darcs/pristine/actions/logout.php | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 _darcs/pristine/actions/logout.php (limited to '_darcs/pristine/actions/logout.php') diff --git a/_darcs/pristine/actions/logout.php b/_darcs/pristine/actions/logout.php new file mode 100644 index 000000000..f00fa0ba7 --- /dev/null +++ b/_darcs/pristine/actions/logout.php @@ -0,0 +1,41 @@ +. + */ + +if (!defined('LACONICA')) { exit(1); } + +require_once(INSTALLDIR.'/lib/openid.php'); + +class LogoutAction extends Action { + + function is_readonly() { + return true; + } + + function handle($args) { + parent::handle($args); + if (!common_logged_in()) { + common_user_error(_('Not logged in.')); + } else { + common_set_user(NULL); + common_real_login(false); # not logged in + common_forgetme(); # don't log back in! + common_redirect(common_local_url('public')); + } + } +} -- cgit v1.2.3-54-g00ecf