Same name and namespace in other branches
- 7.x-1.x spambot.module \spambot_node_insert() 1 comment
Implements hook_node_insert().
File
-
./
spambot.module, line 616
Code
function spambot_node_insert($node) {
$connection = \Drupal::database();
$connection->insert('node_spambot')
->fields([
'nid' => $node->id(),
'uid' => $node->getOwnerId(),
'hostname' => \Drupal::request()->getClientIp(),
])
->execute();
}