mirror of
https://github.com/e107inc/e107.git
synced 2025-07-12 02:26:21 +02:00
Closes #2513 - Clarify messages to main admins on /login.php
This commit is contained in:
@ -40,5 +40,8 @@ define("LAN_LOGIN_28", "Email");
|
|||||||
define("LAN_LOGIN_29", "Username or Email");
|
define("LAN_LOGIN_29", "Username or Email");
|
||||||
define("LAN_LOGIN_30", "Error adding new alt_auth user to DB");
|
define("LAN_LOGIN_30", "Error adding new alt_auth user to DB");
|
||||||
define("LAN_LOGIN_31", "Your credentials could not be added to the system");
|
define("LAN_LOGIN_31", "Your credentials could not be added to the system");
|
||||||
|
define("LAN_LOGIN_32", "You are seeing this message because you are currently logged in as the Main Admin.");
|
||||||
|
define("LAN_LOGIN_33", "[Return to the homepage]"); // the [ ] brackets are replaced with a button link
|
||||||
|
define("LAN_LOGIN_34", "User registration and/or login is currently disabled.");
|
||||||
|
define("LAN_LOGIN_35", "[Enable it]"); // the [ ] brackets are replaced with a button link
|
||||||
?>
|
?>
|
37
login.php
37
login.php
@ -1,20 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
+ ----------------------------------------------------------------------------+
|
* e107 website system
|
||||||
| e107 website system
|
*
|
||||||
|
|
* Copyright (C) e107 Inc (e107.org)
|
||||||
| Copyright (C) 2008-2009 e107 Inc
|
* Released under the terms and conditions of the
|
||||||
| http://e107.org
|
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||||
|
|
*
|
||||||
|
|
* Login routine
|
||||||
| Released under the terms and conditions of the
|
*
|
||||||
| GNU General Public License (http://gnu.org).
|
|
||||||
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/login.php,v $
|
|
||||||
| $Revision$
|
|
||||||
| $Date$
|
|
||||||
| $Author$
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once("class2.php");
|
require_once("class2.php");
|
||||||
@ -34,7 +27,7 @@ if ((USER || e_LOGIN != e_SELF || (empty($pref['user_reg']) && empty($pref['soci
|
|||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
e107::coreLan('login');
|
||||||
|
|
||||||
if(!defined('e_IFRAME')) define('e_IFRAME',true);
|
if(!defined('e_IFRAME')) define('e_IFRAME',true);
|
||||||
require_once(HEADERF);
|
require_once(HEADERF);
|
||||||
@ -96,11 +89,19 @@ if (!USER || getperms('0'))
|
|||||||
|
|
||||||
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
|
$find = array('[', ']');
|
||||||
|
$replace = array("<a href='".e_HTTP."index.php' class='btn btn-primary' role='button'>", "</a>");
|
||||||
|
$return_link = str_replace($find, $replace, LAN_LOGIN_33);
|
||||||
|
|
||||||
|
echo "<div class='alert alert-block alert-error alert-danger center'>".LAN_LOGIN_32." <br /><br />".$return_link."</div>";
|
||||||
|
|
||||||
if(empty($pref['user_reg']))
|
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
|
$find = array('[', ']');
|
||||||
|
$replace = array("<a href='".e_ADMIN_ABS."prefs.php#nav-core-prefs-registration' class='btn btn-primary' role='button' target='_blank'>", "</a>");
|
||||||
|
$pref_link = str_replace($find, $replace, LAN_LOGIN_35);
|
||||||
|
|
||||||
|
echo "<div class='alert alert-block alert-error alert-danger center'>".LAN_LOGIN_34." <br /><br />".$pref_link."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user