diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-08-13 22:18:06 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-08-13 22:18:06 +0800 |
commit | 7dc3a90d1252137859a687e32313ea569dcf8796 (patch) | |
tree | 8da73e6ca6f22a8e08c0126b5521e74d77005f45 /actions/register.php | |
parent | 853b6d38b362e3a905195d9ff850c9a884d412bd (diff) |
Added a configuration option to disable OpenID.
If $config['openid']['enabled'] is set to false, OpenID is removed from
the navigation and direct accesses to OpenID login pages redirect to the
login page.
If OpenID is enabled, $config['site']['openidonly'] is ignored, i.e.
OpenID is required to go OpenID-only.
Diffstat (limited to 'actions/register.php')
-rw-r--r-- | actions/register.php | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/actions/register.php b/actions/register.php index 046a76b80..683d21af8 100644 --- a/actions/register.php +++ b/actions/register.php @@ -329,14 +329,22 @@ class RegisterAction extends Action } else if ($this->error) { $this->element('p', 'error', $this->error); } else { - $instr = - common_markup_to_html(_('With this form you can create '. - ' a new account. ' . - 'You can then post notices and '. - 'link up to friends and colleagues. '. - '(Have an [OpenID](http://openid.net/)? ' . - 'Try our [OpenID registration]'. - '(%%action.openidlogin%%)!)')); + if (common_config('openid', 'enabled')) { + $instr = + common_markup_to_html(_('With this form you can create '. + ' a new account. ' . + 'You can then post notices and '. + 'link up to friends and colleagues. '. + '(Have an [OpenID](http://openid.net/)? ' . + 'Try our [OpenID registration]'. + '(%%action.openidlogin%%)!)')); + } else { + $instr = + common_markup_to_html(_('With this form you can create '. + ' a new account. ' . + 'You can then post notices and '. + 'link up to friends and colleagues.')); + } $this->elementStart('div', 'instructions'); $this->raw($instr); |