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:
parent
973f8cc5f9
commit
754a28430e
@ -292,9 +292,16 @@ class userlogin
|
||||
protected function lookupUser($username, $forceLogin)
|
||||
{
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user