From 0b21941bed977701ab2d7be6a91711901ac02992 Mon Sep 17 00:00:00 2001 From: Sem Date: Mon, 24 Sep 2012 18:16:43 +0200 Subject: Added "remember me" support for OpenID --- return.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'return.php') diff --git a/return.php b/return.php index ab0fc622a..b37f25bd9 100644 --- a/return.php +++ b/return.php @@ -14,9 +14,11 @@ require_once dirname(dirname(dirname(__FILE__))).'/engine/start.php'; elgg_load_library('openid_consumer'); elgg_load_library('openid_client'); +$persistent = get_input('persistent', false); + // get user data from the response $consumer = new ElggOpenIDConsumer($store); -$url = elgg_get_site_url() . 'mod/openid_client/return.php'; +$url = elgg_get_site_url() . "mod/openid_client/return.php?persistent=$persistent"; $consumer->setReturnURL($url); $data = $consumer->completeAuthentication(); if (!$data || !$data['openid_identifier']) { @@ -48,7 +50,7 @@ if ($users) { if ($user) { // log in user and maybe update account (admin setting, user prompt?) try { - login($user); + login($user, $persistent); } catch (LoginException $e) { register_error($e->getMessage()); forward(); -- cgit v1.2.3