mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9247 from jakxnz/pulls/4/record-login-attempt-outputs
ENHANCEMENT: MemberAuthenticator::recordLoginAttempt() outputs
This commit is contained in:
commit
e49cec3a00
@ -166,13 +166,14 @@ class MemberAuthenticator implements Authenticator
|
||||
* @param HTTPRequest $request
|
||||
* @param Member $member
|
||||
* @param boolean $success
|
||||
* @return LoginAttempt|null
|
||||
*/
|
||||
protected function recordLoginAttempt($data, HTTPRequest $request, $member, $success)
|
||||
{
|
||||
if (!Security::config()->get('login_recording')
|
||||
&& !Member::config()->get('lock_out_after_incorrect_logins')
|
||||
) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
// Check email is valid
|
||||
@ -206,7 +207,12 @@ class MemberAuthenticator implements Authenticator
|
||||
|
||||
$attempt->Email = $email;
|
||||
$attempt->IP = $request->getIP();
|
||||
|
||||
$this->invokeWithExtensions('updateLoginAttempt', $attempt, $data, $request);
|
||||
|
||||
$attempt->write();
|
||||
|
||||
return $attempt;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user