diff --git a/e107_handlers/e107_class.php b/e107_handlers/e107_class.php index c7445cfa1..803764343 100644 --- a/e107_handlers/e107_class.php +++ b/e107_handlers/e107_class.php @@ -2358,8 +2358,12 @@ class e107 // login/signup define('e_SIGNUP', SITEURL.(file_exists(e_BASE.'customsignup.php') ? 'customsignup.php' : 'signup.php')); - define('e_LOGIN', SITEURL.(file_exists(e_BASE.'customlogin.php') ? 'customlogin.php' : 'login.php')); - + + if(!defined('e_LOGIN')) + { + define('e_LOGIN', SITEURL.(file_exists(e_BASE.'customlogin.php') ? 'customlogin.php' : 'login.php')); + } + return $this; } diff --git a/login.php b/login.php index f6dfde7eb..932178568 100644 --- a/login.php +++ b/login.php @@ -20,7 +20,7 @@ require_once("class2.php"); include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE); -if (USER) +if (USER || e_LOGIN !='login.php') // Disable page if user logged in, or some custom e_LOGIN value is used. { header('location:'.e_BASE.'index.php'); exit();