concrete/src/Permission/IPService.php
public function logFailedLogin(AddressInterface $ip = null, $ignoreConfig = false)
    {
        if ($ignoreConfig || $this->config->get('concrete.security.ban.ip.enabled')) {
            if ($ip === null) {
                $ip = $this->getRequestIPAddress();
            }
            $comparableIP = $ip->getComparableString();
            $this->connection->executeQuery(
                '
                    INSERT INTO FailedLoginAttempts
                        (flaIp, flaTimestamp)
                    VALUES
                        (?, ' . $this->connection->getDatabasePlatform()->getNowExpression() . ')
                ',
                [$ip->getComparableString()]
            );
            $this->logger->notice(t('Failed login attempt recorded from IP address %s', $ip->toString(), ['ip_address' => $ip->toString()]));
        }
    }
public function logFailedLogin(AddressInterface $ip = null, $ignoreConfig = false)
    {
        if ($ignoreConfig || $this->config->get('concrete.security.ban.ip.enabled')) {
            if ($ip === null) {
                $ip = $this->getRequestIPAddress();
            }
            $comparableIP = $ip->getComparableString();
            $this->connection->executeQuery(
                '
                    INSERT INTO FailedLoginAttempts
                        (flaIp, flaTimestamp)
                    VALUES
                        (?, ' . $this->connection->getDatabasePlatform()->getNowExpression() . ')
                ',
                [$ip->getComparableString()]
            );
            $this->logger->notice(t('Failed login attempt recorded from IP address %s', $ip->toString(), ['ip_address' => $ip->toString()]));
        }
    }
public function logFailedLogin ( AddressInterface $ ip = null , $ ignoreConfig = false ) { if ( $ ignoreConfig || $ this -> config -> get ( 'concrete.security.ban.ip.enabled' ) ) { if ( $ ip === null ) { $ ip = $ this -> getRequestIPAddress ( ) ; } $ comparableIP = $ ip -> getComparableString ( ) ; $ this -> connection -> executeQuery ( '
                    INSERT INTO FailedLoginAttempts
                        (flaIp, flaTimestamp)
                    VALUES
                        (?, ' . $ this -> connection -> getDatabasePlatform ( ) -> getNowExpression ( ) . ')
                ' , [ $ ip -> getComparableString ( ) ] ) ; $ this -> logger -> notice ( t ( 'Failed login attempt recorded from IP address %s' , $ ip -> toString ( ) , [ 'ip_address' => $ ip -> toString ( ) ] ) ) ; } }
Add the current IP address to the list of IPs with failed login attempts.

@param AddressInterface $ip the IP address to log (if null, we'll use the current IP address)
@param bool $ignoreConfig if set to true, we'll add the record even if the IP ban system is disabled in the configuration
Add the current IP address to the list of IPs with failed login attempts .