1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-25 17:01:43 +02:00

#2209 Display message when user registration is disabled and preventing login form from rendering.

This commit is contained in:
Cameron
2017-01-24 15:22:03 -08:00
parent 57c41f5ae9
commit 031c1c922d
2 changed files with 14 additions and 2 deletions

View File

@@ -59,8 +59,13 @@ $query .= "
ORDER BY n.news_sticky DESC, n.news_datestamp DESC ORDER BY n.news_sticky DESC, n.news_datestamp DESC
LIMIT ".$limit; LIMIT ".$limit;
$data = $sql->retrieve($query,true); $data = $sql->retrieve($query,true);
if(empty($data)) if(empty($data))
{ {
e107::getMessage()->addDebug( "No News items found with 'carousel' as the template ")->render(); e107::getMessage()->addDebug( "No News items found with 'carousel' as the template ")->render();
@@ -73,7 +78,7 @@ $count = 0;
$sc = e107::getScBatch('news'); $sc = e107::getScBatch('news');
$text = ''; $text = '';
$nav = array();
foreach($data as $row) foreach($data as $row)
{ {

View File

@@ -91,12 +91,18 @@ if (!USER || getperms('0'))
$LOGIN_TABLE_FOOTER = $LOGIN_TEMPLATE['page']['footer']; $LOGIN_TABLE_FOOTER = $LOGIN_TEMPLATE['page']['footer'];
} }
$text = $tp->parseTemplate($LOGIN_TABLE,true, $sc); $text = $tp->parseTemplate($LOGIN_TABLE,true, $sc);
if(getperms('0')) if(getperms('0'))
{ {
echo "<div class='alert alert-block alert-error alert-danger center'> You are currently logged in as the Main Admin.</div>"; //TODO LAN echo "<div class='alert alert-block alert-error alert-danger center'> You are currently logged in as the Main Admin.</div>"; //TODO LAN
if(empty($pref['user_reg']))
{
echo "<div class='alert alert-block alert-error alert-danger center'>User registration and/or login is currently disabled. <a class='alert-link' target='_blank' href='".e_ADMIN_ABS."prefs.php#nav-core-prefs-registration'>Go here to enable it.</a></div>"; //TODO LAN
}
} }
@@ -113,6 +119,7 @@ if (!USER || getperms('0'))
} }
require_once(FOOTERF); require_once(FOOTERF);
exit; exit;
?> ?>