diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/openid_client/login.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/actions/openid_client/login.php b/actions/openid_client/login.php index cf991ea0f..604374ced 100644 --- a/actions/openid_client/login.php +++ b/actions/openid_client/login.php @@ -6,11 +6,13 @@ elgg_load_library('openid_consumer'); $provider = get_input('openid_provider'); -$username = get_input('openid_username'); + +if ($provider == 'others') { + $provider = get_input('openid_url'); +} $consumer = new ElggOpenIDConsumer($store); -$consumer->setProvider($provider); -$consumer->setUsername($username); +$consumer->setURL($provider); $consumer->setReturnURL(elgg_get_site_url() . 'mod/openid_client/return.php'); $html = $consumer->requestAuthentication(); @@ -18,7 +20,12 @@ if ($html) { echo $html; exit; } else { - $provider_name = elgg_echo("openid_client:provider:$provider"); + $flipped_providers = array_flip(elgg_get_config('openid_providers')); + if (isset($flipped_providers[$provider])) { + $provider_name = $flipped_providers[$provider]; + } else { + $provider_name = $provider; + } register_error(elgg_echo('openid_client:error:no_html', array($provider_name))); forward(); } |