function invite_stats_display_top_inviters in Invite 7.2
Same name and namespace in other branches
- 5.2 invite_stats.module \invite_stats_display_top_inviters()
- 5 invite_stats.module \invite_stats_display_top_inviters()
- 6.2 invite_stats.module \invite_stats_display_top_inviters()
Render the "Top inviters" block.
1 call to invite_stats_display_top_inviters()
- invite_stats_block_view in modules/
invite_stats/ invite_stats.module - Implements hook_block_view().
File
- modules/
invite_stats/ invite_stats.module, line 139 - Displays some statistics about sent invitations.
Code
function invite_stats_display_top_inviters() {
$inviters = array();
$result = db_query_range("SELECT uid, COUNT(uid) AS count FROM {invite} WHERE joined <> 0 GROUP BY uid ORDER BY count DESC", 0, variable_get('invite_num_ranks', 5));
foreach ($result as $row) {
$inviters[] = $row;
}
return theme('invite_stats_ranking', array(
'inviters' => $inviters,
));
}