mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8390 from caffeineinc/bugfix/8389-login-attempt-performance-issues
Performance issues with BasicAuth and LoginAttempts
This commit is contained in:
commit
f01473f1b3
@ -46,6 +46,10 @@ class LoginAttempt extends DataObject
|
|||||||
'Member' => Member::class, // only linked if the member actually exists
|
'Member' => Member::class, // only linked if the member actually exists
|
||||||
);
|
);
|
||||||
|
|
||||||
|
private static $indexes = array(
|
||||||
|
"EmailHashed" => true
|
||||||
|
);
|
||||||
|
|
||||||
private static $table_name = "LoginAttempt";
|
private static $table_name = "LoginAttempt";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,7 +90,6 @@ class LoginAttempt extends DataObject
|
|||||||
public static function getByEmail($email)
|
public static function getByEmail($email)
|
||||||
{
|
{
|
||||||
return static::get()->filterAny(array(
|
return static::get()->filterAny(array(
|
||||||
'Email' => $email,
|
|
||||||
'EmailHashed' => sha1($email),
|
'EmailHashed' => sha1($email),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user