mirror of
https://github.com/e107inc/e107.git
synced 2025-07-24 08:22:07 +02:00
#2209 Display message when user registration is disabled and preventing login form from rendering.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
@@ -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 "<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);
|
||||
|
||||
exit;
|
||||
|
||||
?>
|
Reference in New Issue
Block a user