From a033662a3a7ba9955e416d5f23db3825afd0bb66 Mon Sep 17 00:00:00 2001 From: Jackson Darlow Date: Wed, 18 Sep 2019 13:33:55 +1200 Subject: [PATCH] MemberAuthenticator::recordLoginAttempt() outputs --- src/Security/MemberAuthenticator/MemberAuthenticator.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Security/MemberAuthenticator/MemberAuthenticator.php b/src/Security/MemberAuthenticator/MemberAuthenticator.php index c51cecfd3..a6a9de746 100644 --- a/src/Security/MemberAuthenticator/MemberAuthenticator.php +++ b/src/Security/MemberAuthenticator/MemberAuthenticator.php @@ -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; } /**