diff --git a/e107_plugins/login_menu/login_menu.php b/e107_plugins/login_menu/login_menu.php index a5eca699a..1590124a2 100644 --- a/e107_plugins/login_menu/login_menu.php +++ b/e107_plugins/login_menu/login_menu.php @@ -17,9 +17,12 @@ if(defined('FPW_ACTIVE')) return; // prevent failed login attempts when fpw.php is loaded before this menu. } -global $eMenuActive, $pref, $e107, $sql, $tp, $ns, $use_imagecode, $ADMIN_DIRECTORY, $LOGIN_MENU_MESSAGE, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR, +global $eMenuActive, $pref, $e107, $use_imagecode, $ADMIN_DIRECTORY, $LOGIN_MENU_MESSAGE, $LOGIN_MENU_STATITEM, $LM_STATITEM_SEPARATOR, $login_menu_shortcodes, $LOGIN_MENU_FORM, $LOGIN_MENU_LOGGED, $LOGIN_MENU_STATS, $LOGIN_MENU_EXTERNAL_LINK; //FIXME +$sql = e107::getDb(); +$tp = e107::getParser(); +$ns = e107::getRender(); $ip = e107::getIPHandler()->getIP(FALSE); //shortcodes @@ -159,6 +162,12 @@ if (USER == TRUE || ADMIN == TRUE) // START NOT LOGGED CODE else { + if (intval($pref['user_reg']) === 0) + { + return; + } + + //get templates if (!$LOGIN_MENU_FORM || !$LOGIN_MENU_MESSAGE) { if (file_exists(THEME.'templates/login_menu/login_menu_template.php')) // Preferred v2.x location.