mirror of
https://github.com/e107inc/e107.git
synced 2025-07-12 18:46:20 +02:00
Fixed username-length when email login is being used.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user