From aae0fa0c6762d25e048c297156f8969c6242eb11 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 17 Dec 2011 21:52:20 -0500 Subject: added support for OpenID 1.x --- classes/ElggOpenIDConsumer.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/ElggOpenIDConsumer.php b/classes/ElggOpenIDConsumer.php index 864e47d41..3918086ab 100644 --- a/classes/ElggOpenIDConsumer.php +++ b/classes/ElggOpenIDConsumer.php @@ -142,13 +142,17 @@ class ElggOpenIDConsumer { $url = "http://$username.blogspot.com/"; break; case 'wordpress': - $url = ""; + // username is actually the blog name + $url = "http://$username.wordpress.com/"; + break; + case 'livejournal': + $url = "http://$username.livejournal.com/"; break; case 'aol': - $url = "http://openid.aol.com/$username"; + $url = "https://openid.aol.com/"; break; case 'verisign': - $url = "http://username.pip.verisignlabs.com/"; + $url = "https://pip.verisignlabs.com/ "; break; case 'myopenid': $url = 'https://myopenid.com/'; @@ -204,6 +208,8 @@ class ElggOpenIDConsumer { * the provider. If JavaScript is not enabled, a plain html form with a * continue button is displayed. * + * This also supports OpenID 1.x but has not been tested as thoroughly. + * * @return mixed */ protected function getForm() { @@ -213,7 +219,13 @@ class ElggOpenIDConsumer { return $html; } else { // OpenID 1.x - return false; + $redirect_url = $this->request->redirectURL(elgg_get_site_url(), $this->returnURL); + + if (Auth_OpenID::isFailure($redirect_url)) { + return false; + } else { + forward($redirect_url); + } } } -- cgit v1.2.3