You are here

user_stats.api.php in User Stats 7

Same filename and directory in other branches
  1. 6 user_stats.api.php

File

user_stats.api.php
View source
<?php

/**
 * Aggregates list of all custom user statistics
 */
function hook_default_user_stats() {
  return array(
    'custom_count_1' => 'custom_count_1_callback',
    'custom_count_2' => 'custom_count_2_callback',
  );
}
function custom_count_1_callback($uid = NULL) {
  global $user;
  if ($uid == NULL) {
    $uid = $user->uid;
  }
  return 1;
}
function custom_count_2_callback($uid = NULL) {
  global $user;
  if ($uid == NULL) {
    $uid = $user->uid;
  }
  return 2;
}

Functions

Namesort descending Description
custom_count_1_callback
custom_count_2_callback
hook_default_user_stats Aggregates list of all custom user statistics