diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-19 12:51:25 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-19 12:51:25 -0700 |
commit | 7005ef66617b265ddccdd9082c2368bf014a7e83 (patch) | |
tree | 52f853c4d47063f0af488a7ff5fb52df50b430bb /plugins/OpenID/openidlogin.php | |
parent | 48dc899acb9a0ac87140353092dab1f5e67753d8 (diff) | |
parent | a39a934dd4a133bad6e76fa9a5018cedcb70225c (diff) |
Merge branch 'testing' into 0.9.x
Conflicts:
plugins/OpenID/openidlogin.php
Diffstat (limited to 'plugins/OpenID/openidlogin.php')
-rw-r--r-- | plugins/OpenID/openidlogin.php | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/plugins/OpenID/openidlogin.php b/plugins/OpenID/openidlogin.php index ec05daeb1..34e00ccce 100644 --- a/plugins/OpenID/openidlogin.php +++ b/plugins/OpenID/openidlogin.php @@ -30,7 +30,12 @@ class OpenidloginAction extends Action // TRANS: Client error message trying to log on with OpenID while already logged on. $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); @@ -124,11 +129,20 @@ class OpenidloginAction extends Action $this->elementStart('ul', 'form_data'); $this->elementStart('li'); - // TRANS: OpenID plugin logon form field label. - $this->input('openid_url', _m('OpenID URL'), - $this->openid_url, - // TRANS: OpenID plugin logon form field instructions. - _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 { + // TRANS: OpenID plugin logon form field label. + $this->input('openid_url', _m('OpenID URL'), + $this->openid_url, + // TRANS: OpenID plugin logon form field instructions. + _m('Your OpenID URL')); + } $this->elementEnd('li'); $this->elementStart('li', array('id' => 'settings_rememberme')); // TRANS: OpenID plugin logon form checkbox label for setting to put the OpenID information in a cookie. |