X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Flogout.php;h=86d6270abe550020f63f741ddceb8adc8e6fc1b2;hb=6edbf3ca781d20f2ec98daf32080c60e804d8215;hp=3b6914411b263e6c80da5bc98b3246fde44296bd;hpb=b6cfd2dffeeb733f07818db5f4ce11d4b3d51771;p=quix0rs-gnu-social.git diff --git a/actions/logout.php b/actions/logout.php index 3b6914411b..86d6270abe 100644 --- a/actions/logout.php +++ b/actions/logout.php @@ -1,32 +1,44 @@ . */ -if (!defined('LACONICA')) { exit(1) } +if (!defined('LACONICA')) { exit(1); } -class LogoutAction extends Action { - function handle($args) { - parent::handle($args); - if (!common_logged_in()) { - common_user_error(_t('Not logged in.')); - } else { - common_set_user(NULL); - common_redirect(common_local_url('main')); - } - } +require_once(INSTALLDIR.'/lib/openid.php'); + +class LogoutAction extends Action +{ + + function isReadOnly() + { + return true; + } + + function handle($args) + { + parent::handle($args); + 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! + common_redirect(common_local_url('public')); + } + } }