mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Closes #2513 - Clarify messages to main admins on /login.php
This commit is contained in:
parent
9a8c1d375b
commit
e1ce2f528d
@ -12,7 +12,7 @@
|
||||
define("LAN_LOGIN_1", "User name");
|
||||
define("LAN_LOGIN_2", "User password");
|
||||
define("LAN_LOGIN_3", "Protected server");
|
||||
define("LAN_LOGIN_4", "Please sign in"); // XXX Modified
|
||||
define("LAN_LOGIN_4", "Please sign in"); // XXX Modified
|
||||
define("LAN_LOGIN_5", "Click here to Sign-Up");
|
||||
define("LAN_LOGIN_6", "Not accepting new members at this time");
|
||||
define("LAN_LOGIN_7", "Enter visible code");
|
||||
@ -40,5 +40,8 @@ define("LAN_LOGIN_28", "Email");
|
||||
define("LAN_LOGIN_29", "Username or Email");
|
||||
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_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
|
||||
?>
|
47
login.php
47
login.php
@ -1,20 +1,13 @@
|
||||
<?php
|
||||
/*
|
||||
+ ----------------------------------------------------------------------------+
|
||||
| e107 website system
|
||||
|
|
||||
| Copyright (C) 2008-2009 e107 Inc
|
||||
| http://e107.org
|
||||
|
|
||||
|
|
||||
| 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$
|
||||
+----------------------------------------------------------------------------+
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* Login routine
|
||||
*
|
||||
*/
|
||||
|
||||
require_once("class2.php");
|
||||
@ -34,7 +27,7 @@ if ((USER || e_LOGIN != e_SELF || (empty($pref['user_reg']) && empty($pref['soci
|
||||
exit();
|
||||
}
|
||||
|
||||
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
||||
e107::coreLan('login');
|
||||
|
||||
if(!defined('e_IFRAME')) define('e_IFRAME',true);
|
||||
require_once(HEADERF);
|
||||
@ -42,18 +35,18 @@ $use_imagecode = ($pref['logcode'] && extension_loaded("gd"));
|
||||
|
||||
define("LOGIN_CAPTCHA", $use_imagecode);
|
||||
|
||||
//if (LOGIN_CAPTCHA)
|
||||
//if (LOGIN_CAPTCHA)
|
||||
//{
|
||||
//require_once(e_HANDLER."secure_img_handler.php");
|
||||
//$sec_img = new secure_image;
|
||||
//}
|
||||
|
||||
if (!USER || getperms('0'))
|
||||
if (!USER || getperms('0'))
|
||||
{
|
||||
if (!defined('LOGINMESSAGE')) define('LOGINMESSAGE', ''); // LOGINMESSAGE only appears with errors
|
||||
require_once(e_HANDLER.'form_handler.php'); // required for BC
|
||||
$rs = new form; // required for BC
|
||||
|
||||
|
||||
if (empty($LOGIN_TABLE))
|
||||
{
|
||||
|
||||
@ -90,21 +83,29 @@ if (!USER || getperms('0'))
|
||||
$LOGIN_TABLE = "<form id='login-page' class='form-signin' method='post' action='".e_SELF."' onsubmit='hashLoginPassword(this)' >".$LOGIN_TEMPLATE['page']['body']."</form>";
|
||||
$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
|
||||
$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']))
|
||||
{
|
||||
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>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$login_message = SITENAME; // $login_message = LAN_LOGIN_3." | ".SITENAME;
|
||||
if(strpos($LOGIN_TABLE_HEADER,'LOGIN_TABLE_LOGINMESSAGE') === false && strpos($LOGIN_TABLE,'LOGIN_TABLE_LOGINMESSAGE') === false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user