From 031c1c922d1eb85d51b1c5861bd84b76121256c0 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 24 Jan 2017 15:22:03 -0800 Subject: [PATCH] #2209 Display message when user registration is disabled and preventing login form from rendering. --- e107_plugins/news/news_carousel_menu.php | 7 ++++++- login.php | 9 ++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/e107_plugins/news/news_carousel_menu.php b/e107_plugins/news/news_carousel_menu.php index 4d4fd4a63..b25bc41e4 100644 --- a/e107_plugins/news/news_carousel_menu.php +++ b/e107_plugins/news/news_carousel_menu.php @@ -59,8 +59,13 @@ $query .= " ORDER BY n.news_sticky DESC, n.news_datestamp DESC LIMIT ".$limit; + + + $data = $sql->retrieve($query,true); + + if(empty($data)) { e107::getMessage()->addDebug( "No News items found with 'carousel' as the template ")->render(); @@ -73,7 +78,7 @@ $count = 0; $sc = e107::getScBatch('news'); $text = ''; - +$nav = array(); foreach($data as $row) { diff --git a/login.php b/login.php index b186de6ba..75645c0cf 100644 --- a/login.php +++ b/login.php @@ -91,12 +91,18 @@ if (!USER || getperms('0')) $LOGIN_TABLE_FOOTER = $LOGIN_TEMPLATE['page']['footer']; } - + $text = $tp->parseTemplate($LOGIN_TABLE,true, $sc); if(getperms('0')) { echo "
You are currently logged in as the Main Admin.
"; //TODO LAN + + if(empty($pref['user_reg'])) + { + echo "
User registration and/or login is currently disabled. Go here to enable it.
"; //TODO LAN + } + } @@ -113,6 +119,7 @@ if (!USER || getperms('0')) } require_once(FOOTERF); + exit; ?> \ No newline at end of file