]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed facebook connect login nav to obey openid settings
authorJeffery To <jeffery.to@gmail.com>
Fri, 9 Oct 2009 03:31:55 +0000 (11:31 +0800)
committerJeffery To <jeffery.to@gmail.com>
Fri, 9 Oct 2009 03:31:55 +0000 (11:31 +0800)
plugins/FBConnect/FBCLoginGroupNav.php

index 6e12c20403cc0a9e5a52038d0b2e131672134102..81b2520a4c628e2830b66657878f82252cd8fe4c 100644 (file)
@@ -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'));