From 3746e12c5b7eea838c46723f31beb754cf77c4b4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 6 Jun 2016 13:36:00 -0700 Subject: [PATCH] Possible fix for #1684 - login failure with long email address. --- e107_handlers/admin_log_class.php | 2 +- e107_handlers/login.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/e107_handlers/admin_log_class.php b/e107_handlers/admin_log_class.php index 6a957a977..4e1fb8d23 100644 --- a/e107_handlers/admin_log_class.php +++ b/e107_handlers/admin_log_class.php @@ -486,7 +486,7 @@ class e_admin_log $this->rldb->insert("audit_log", $insertQry); - return true; + return true; // $this->rldb->insert("audit_log", "0, ".intval($time_sec).', '.intval($time_usec).", '{$eventcode}', {$userid}, '{$userstring}', '{$userIP}', '{$title}', '{$detail}' "); } diff --git a/e107_handlers/login.php b/e107_handlers/login.php index e68c5121e..14bb5f8d5 100644 --- a/e107_handlers/login.php +++ b/e107_handlers/login.php @@ -340,7 +340,12 @@ class userlogin $maxLength = varset($pref['loginname_maxlength'],30); - if(varset($pref['allowEmailLogin'])==1) // Email login only + /* + * 2: Username/Email and Password + * 1: Email and Password + * 0: Username and Password + */ + if(!empty($pref['allowEmailLogin'])) // Email login only { $maxLength = 254; // Maximum email length }