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