public function SFW::actionsForPassed in Anti Spam by CleanTalk 9.1.x
Same name and namespace in other branches
- 8.4 src/lib/Cleantalk/Common/Firewall/Modules/SFW.php \Cleantalk\Common\Firewall\Modules\SFW::actionsForPassed()
@inheritdoc
Overrides FirewallModule::actionsForPassed
File
- src/
lib/ Cleantalk/ Common/ Firewall/ Modules/ SFW.php, line 174
Class
Namespace
Cleantalk\Common\Firewall\ModulesCode
public function actionsForPassed($result) {
if ($this->set_cookies && !headers_sent()) {
$status = $result['status'] === 'PASS_SFW__BY_WHITELIST' ? '1' : '0';
$cookie_val = md5($result['ip'] . $this->api_key) . $status;
CleantalkFuncs::apbct_setcookie('ct_sfw_pass_key', $cookie_val);
}
}