public function FailedLogins::evaluatePlain in Security Review 8
Evaluates a CheckResult and returns a plaintext output.
Parameters
\Drupal\security_review\CheckResult $result: The check result to evaluate.
Return value
string The evaluation string.
Overrides Check::evaluatePlain
File
- src/
Checks/ FailedLogins.php, line 128
Class
- FailedLogins
- Checks for abundant failed logins.
Namespace
Drupal\security_review\ChecksCode
public function evaluatePlain(CheckResult $result) {
$findings = $result
->findings();
if (empty($findings)) {
return '';
}
$output = $this
->t('Suspicious IP addresses:') . ":\n";
foreach ($findings as $ip) {
$output .= "\t" . $ip . "\n";
}
return $output;
}