- Issue created by @somebodysysop
- πΊπ¦Ukraine goodboy Kharkiv, Ukraine
@somebodysysop,
try$controller = \Drupal::service('autoban'); $banned_ip = $controller->getBannedIp($rule); $banned = $controller->banIpList($banned_ip, $rule);
You need to create an Autoban rule before and use the rule ID (
$rule
).
$banned
is the count of the banned IP from the$banned_ip list.