diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-10-09 11:31:55 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-10-09 11:31:55 +0800 |
commit | b8f8c41c18ae166a88c4a87f90602ad8e1ed2ede (patch) | |
tree | aea6c7aed45100c57ea6cacc6732ee1d246d7498 | |
parent | 11e36b18cc18890a2360e4cba14f5f2895f6eb3b (diff) |
Fixed facebook connect login nav to obey openid settings
-rw-r--r-- | plugins/FBConnect/FBCLoginGroupNav.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/FBConnect/FBCLoginGroupNav.php b/plugins/FBConnect/FBCLoginGroupNav.php index 6e12c2040..81b2520a4 100644 --- a/plugins/FBConnect/FBCLoginGroupNav.php +++ b/plugins/FBConnect/FBCLoginGroupNav.php @@ -78,16 +78,20 @@ class FBCLoginGroupNav extends Widget // action => array('prompt', 'title') $menu = array(); - $menu['login'] = array(_('Login'), - _('Login with a username and password')); - - if (!(common_config('site','closed') || common_config('site','inviteonly'))) { - $menu['register'] = array(_('Register'), - _('Sign up for a new account')); + if (!common_config('site','openidonly')) { + $menu['login'] = array(_('Login'), + _('Login with a username and password')); + + if (!(common_config('site','closed') || common_config('site','inviteonly'))) { + $menu['register'] = array(_('Register'), + _('Sign up for a new account')); + } } - $menu['openidlogin'] = array(_('OpenID'), - _('Login or register with OpenID')); + if (common_config('openid', 'enabled')) { + $menu['openidlogin'] = array(_('OpenID'), + _('Login or register with OpenID')); + } $menu['FBConnectLogin'] = array(_('Facebook'), _('Login or register using Facebook')); |