function user_stats_node_update in User Stats 7
Implements hook_node_update().
File
- ./
user_stats.module, line 311 - User Stats provides commonly requested user statistics for themers. These are:
Code
function user_stats_node_update($node) {
$post_count_content_types = variable_get('user_stats_included_content_types', array());
if ((empty($post_count_content_types) || in_array($node->type, $post_count_content_types)) && variable_get('user_stats_count_posts', TRUE)) {
// Can't think of any other way of doing this than resetting the user.
user_stats_post_count_update('reset', $node->uid);
}
// User IP addresses are only interesting if they are posting the content.
global $user;
if ($node->uid == $user->uid) {
user_stats_ip_address_update($user->uid, ip_address());
}
}