mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 07:36:32 +02:00
More user-audit logs.
This commit is contained in:
@@ -344,16 +344,20 @@ class userlogin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check username general format
|
// Check username general format
|
||||||
if (!$forceLogin && (strlen($username) > $maxLength))
|
if (!$forceLogin && (strlen($username) > $maxLength)) // Error - invalid username
|
||||||
{ // Error - invalid username
|
{
|
||||||
|
$auditLog = array('reason'=>'username longer than maxlength', 'maxlength'=> $maxLength, 'username'=>$username);
|
||||||
|
e107::getAdminLog()->user_audit(USER_AUDIT_LOGIN, $auditLog, 0, $username);
|
||||||
$this->invalidLogin($username,LOGIN_BAD_USERNAME);
|
$this->invalidLogin($username,LOGIN_BAD_USERNAME);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $this->getLookupQuery($username, $forceLogin);
|
$query = $this->getLookupQuery($username, $forceLogin);
|
||||||
|
|
||||||
if (e107::getDb()->select('user', '*', $query) !== 1) // Handle duplicate emails as well
|
if (e107::getDb()->select('user', '*', $query) !== 1) // Handle duplicate emails as well // Invalid user
|
||||||
{ // Invalid user
|
{
|
||||||
|
$auditLog = array('reason'=>'query failed to return a result', 'query'=>$query, 'username'=>$username);
|
||||||
|
e107::getAdminLog()->user_audit(USER_AUDIT_LOGIN, $auditLog, 0, $username);
|
||||||
return $this->invalidLogin($username,LOGIN_BAD_USER);
|
return $this->invalidLogin($username,LOGIN_BAD_USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user