MemberAuthenticator::recordLoginAttempt() outputs

This commit is contained in:
Jackson Darlow 2019-09-18 13:33:55 +12:00
parent 4268db069d
commit a033662a3a

View File

@ -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;
}
/**