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)
This commit is contained in:
Alessandro Marotta 2020-05-10 19:07:22 +02:00
parent 10efe79b93
commit f3d1e308e5
1 changed files with 1 additions and 2 deletions

View File

@ -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);