*

Recent

Author Topic: Remove guest from member count  (Read 4799 times)

Dillon

  • Developer
  • Sr. Member
  • ******
  • Posts: 340
  • Force: +3/-0
    • Arcade Freak
Remove guest from member count
« on: November 26, 2011, 02:36:42 PM »
This will make the members count in stats only count actual users and not the guest user.

In template.php find
Code: [Select]
$totalusers = $db->num_rows($db->query(sprintf('SELECT userid FROM dd_users WHERE activation_key="0"')));

and replace it with

Code: [Select]
$totalusers = $db->num_rows($db->query(sprintf('SELECT userid FROM dd_users WHERE activation_key="0" AND user_level!="0"')));

You can also remove the Guest from the members list by changing

Code: [Select]
$r = $db->query(sprintf("SELECT * FROM dd_users WHERE activation_key='0' ORDER BY username ASC LIMIT $limits,$max"));
to
Code: [Select]
$r = $db->query(sprintf("SELECT * FROM dd_users WHERE activation_key='0' AND user_level!='0' ORDER BY username ASC LIMIT $limits,$max"));
« Last Edit: November 26, 2011, 02:58:07 PM by spagetiokillers »