You are here

function user_stats_reset_counts in User Stats 7

Same name and namespace in other branches
  1. 5 user_stats.module \user_stats_reset_counts()
  2. 6 user_stats.module \user_stats_reset_counts()

Resets statistics. Full stop.

Parameters

$statistic: The name of the statistic to be reset. Corresponds with {user_stats_values}.name.

3 calls to user_stats_reset_counts()
user_stats_reset_login_count in ./user_stats.admin.inc
Reset login count handler.
user_stats_reset_post_count in ./user_stats.admin.inc
Reset post count handler.
user_stats_settings_change in ./user_stats.admin.inc
Settings change callback. TODO: make this check a setting has been changed before resetting counts.

File

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

Code

function user_stats_reset_counts($statistic) {
  db_delete('user_stats_values')
    ->condition('name', $statistic)
    ->execute();
}