From 0b8b67d74a51586c5a45012e9e0f7bbe54f7e954 Mon Sep 17 00:00:00 2001 From: Pablo Martin Date: Wed, 17 Oct 2012 02:38:11 +0000 Subject: Elgg OpenID server adapted for Elgg 1.8. --- actions/autologout.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 actions/autologout.php (limited to 'actions/autologout.php') diff --git a/actions/autologout.php b/actions/autologout.php new file mode 100755 index 000000000..36a7191c2 --- /dev/null +++ b/actions/autologout.php @@ -0,0 +1,48 @@ + + * @copyright Curverider Ltd 2008-2009 + * @link http://elgg.org/ + */ + +require_once(dirname(dirname(__FILE__)).'/openid_server_include.php'); + +require_once ('lib/common.php'); +require_once ('lib/session.php'); + +$iframe_template = << +'); +END; + +$store = getOpenIDServerStore(); + +$openid_url = getLoggedinUser(); +$sites = $store->getAutoLogoutSites(); + +// TODO: get this to work with posts +$iframes = ''; +foreach ($sites as $site) { + $iframes .= sprintf($iframe_template,$site->width,$site->height,sprintf($site->auto_logout,$openid_url)); +} +$body = elgg_view("openid_server/forms/autologout", + array( + 'iframes' => $iframes, + + )); + +$CONFIG->events['logout'] = array(); + +logout(); +header("Content-type:text/html"); +print $body; +?> -- cgit v1.2.3