mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Closes #3527 - Hide login_menu when user registration AND login are disabled
This commit is contained in:
parent
66c2014830
commit
3341742b28
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user