public function CredentialsCheckFlood::isAllowedHost in Commerce Core 8.2
Whether or not a client machine is allowed to perform a credentials check.
Independent of the per-user limit to catch attempts from one IP to log in to many different user accounts. We have a reasonably high limit since there may be only one apparent IP for all users at an institution.
Parameters
string $ip: The client IP address.
Return value
bool TRUE if credentials check is allowed, FALSE otherwise.
Overrides CredentialsCheckFloodInterface::isAllowedHost
File
- src/
CredentialsCheckFlood.php, line 92
Class
- CredentialsCheckFlood
- Provides flood protection for login credential checks.
Namespace
Drupal\commerceCode
public function isAllowedHost($ip) {
return $this->flood
->isAllowed('user.failed_login_ip', $this->config
->get('ip_limit'), $this->config
->get('ip_window'), $ip);
}