Hide Non Activated Users From Member List
ShadowKyogre Offline
Junior Member
**
Posts: 5
Joined: Apr 2012
Post: #4
RE: Hide Non Activated Users From Member List
I changed up the xtmn_hnau_stats function to also replace the number of registered users to the ones that are currently activated. There's probably a more efficient way to count up all the activated users.

PHP Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function xtmn_hnau_stats(){
	if($GLOBALS['mybb']->usergroup['cancp'] != 1){
		$lastreguser = $GLOBALS['cache']->read('xtmn_hnau_last_reg_users');
		if(!is_array($GLOBALS['stats'])) $GLOBALS['stats'] = $GLOBALS['cache']->read('stats');
		$GLOBALS['stats']['lastuid'] = $lastreguser['lastuid'];
		$GLOBALS['stats']['lastusername'] = $lastreguser['lastusername'];
		$GLOBALS['cache']->cache['stats'] = $GLOBALS['stats'];
		
		//modify member count on index stats too
		$query = $GLOBALS['db']->simple_select('users','COUNT(*) AS num_users','usergroup!=5');
		$activeusercount = $GLOBALS['db']->fetch_field($query, 'num_users');
		$GLOBALS['stats']['numusers'] = $activeusercount;
		$GLOBALS['cache']->cache['stats'] = $GLOBALS['stats'];
		//end modifications
	}
}

(This post was last modified: 04-06-2012 10:43 AM by ShadowKyogre.)
04-05-2012 02:12 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Hide Non Activated Users From Member List - ShadowKyogre - 04-05-2012 02:12 PM

 Standard Tools
Forum Jump: