You are here

private function RateBotDetector::registerBot in Rate 8

Save IP address as a bot.

1 call to RateBotDetector::registerBot()
RateBotDetector::checkIsBot in src/RateBotDetector.php
Check if the current user is blocked.

File

src/RateBotDetector.php, line 104

Class

RateBotDetector
The rate.bot_detector service.

Namespace

Drupal\rate

Code

private function registerBot() {
  $this->database
    ->insert('rate_bot_ip')
    ->fields([
    'ip' => $this->ip,
  ])
    ->execute();
}