From eb2349e1c20cd6a0f35cf5bc3adf5d54edb127a0 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Tue, 7 Jun 2011 02:20:27 +0000 Subject: [PATCH] Disable login.php when a custom e_LOGIN is used. (customlogin.php for example) --- e107_handlers/e107_class.php | 8 ++++++-- login.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) 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();