function anonymous_publishing_pet_node_insert in Anonymous Publishing 7
Implements hook_node_insert().
File
- modules/
pet/ anonymous_publishing_pet.module, line 422 - Main hooks for Anonymous Publishing PET module.
Code
function anonymous_publishing_pet_node_insert($node) {
global $user;
if (user_is_logged_in() && isset($node->anonymous_publishing['options'])) {
$asanon = $node->anonymous_publishing['options'];
if ($asanon) {
db_insert('anonymous_publishing_realname')
->fields(array(
'nid' => $node->nid,
'cid' => 0,
'uid' => $user->uid,
))
->execute();
}
}
}