1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-18 05:09:05 +01:00

Fixed username-length when email login is being used.

This commit is contained in:
CaMer0n 2011-05-18 08:55:22 +00:00
parent 973f8cc5f9
commit 754a28430e

View File

@ -293,8 +293,15 @@ class userlogin
{
global $pref;
$maxLength = varset($pref['loginname_maxlength'],30);
if(varset($pref['allowEmailLogin'])==1) // Email login only
{
$maxLength = 254; // Maximum email length
}
// Check username general format
if (!$forceLogin && (strlen($username) > varset($pref['loginname_maxlength'],30)))
if (!$forceLogin && (strlen($username) > $maxLength))
{ // Error - invalid username
$this->invalidLogin($username,LOGIN_BAD_USERNAME);
return FALSE;