diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-18 13:37:46 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-18 13:37:46 -0700 |
commit | d0ba34e0f32ac71b552302ec875943e0e9236720 (patch) | |
tree | 832455e96f8a6b81dd6279f20ae7f38b7bc60a8b /plugins/OpenID/openidlogin.php | |
parent | d5b4df4097c2d64e52f249042038ddbf99769b6c (diff) | |
parent | 7c828ae5f8ab20f0daa8a1482fadce9b3e858975 (diff) |
Merge branch 'openid-teams' into testing
Diffstat (limited to 'plugins/OpenID/openidlogin.php')
-rw-r--r-- | plugins/OpenID/openidlogin.php | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/plugins/OpenID/openidlogin.php b/plugins/OpenID/openidlogin.php index 2a743672c..8c559c934 100644 --- a/plugins/OpenID/openidlogin.php +++ b/plugins/OpenID/openidlogin.php @@ -29,7 +29,12 @@ class OpenidloginAction extends Action if (common_is_real_login()) { $this->clientError(_m('Already logged in.')); } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { - $openid_url = $this->trimmed('openid_url'); + $provider = common_config('openid', 'trusted_provider'); + if ($provider) { + $openid_url = $provider; + } else { + $openid_url = $this->trimmed('openid_url'); + } oid_assert_allowed($openid_url); @@ -116,9 +121,18 @@ class OpenidloginAction extends Action $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - $this->input('openid_url', _m('OpenID URL'), - $this->openid_url, - _m('Your OpenID URL')); + $provider = common_config('openid', 'trusted_provider'); + if ($provider) { + $this->element('label', array(), _m('OpenID provider')); + $this->element('span', array(), $provider); + $this->element('p', 'form_guide', + _m('You will be sent to the provider\'s site for authentication.')); + $this->hidden('openid_url', $provider); + } else { + $this->input('openid_url', _m('OpenID URL'), + $this->openid_url, + _m('Your OpenID URL')); + } $this->elementEnd('li'); $this->elementStart('li', array('id' => 'settings_rememberme')); $this->checkbox('rememberme', _m('Remember me'), false, |