From f3d1e308e58ea227e4bafad7cbf3bb48be08f4e8 Mon Sep 17 00:00:00 2001 From: Alessandro Marotta Date: Sun, 10 May 2020 19:07:22 +0200 Subject: [PATCH] Update Member.php The public function isLockedOut() in Member.php call LoginAttempt::getByEmail but serves to it the unique_identifier_field. This PR could allow to extensions to patch the use of uniqueidentifierfield (otherwise it would be necessary to extends the Member Class to override the isLockedOut function, with a lot of problems) --- src/Security/Member.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Security/Member.php b/src/Security/Member.php index cdff27304..1a587d857 100644 --- a/src/Security/Member.php +++ b/src/Security/Member.php @@ -382,8 +382,7 @@ class Member extends DataObject return false; } - $idField = static::config()->get('unique_identifier_field'); - $attempts = LoginAttempt::getByEmail($this->{$idField}) + $attempts = LoginAttempt::getByEmail($this->Email) ->sort('Created', 'DESC') ->limit($maxAttempts);