You are here

function user_stats_post_count_reset_action in User Stats 7

Same name and namespace in other branches
  1. 6 user_stats.module \user_stats_post_count_reset_action()

Implementation of a Drupal action.

Resets a user's post count.

File

./user_stats.module, line 592
User Stats provides commonly requested user statistics for themers. These are:

Code

function user_stats_post_count_reset_action(&$object, $context = array()) {
  if (isset($object->uid)) {
    $uid = $object->uid;
  }
  elseif (isset($context['uid'])) {
    $uid = $context['uid'];
  }
  else {
    global $user;
    $uid = $user->uid;
  }
  user_stats_post_count_update('reset', $uid);
}