https://www.icyphoenix.com/viewtopic.php?f=28&t=4511&p=30429#p30429
-----------------------------------
novice programmer
Sat 09 Aug, 2008 14:35

Privacity Mod For Memberlist And All Users Group
-----------------------------------
Due to the laws of user data protecting, this mod will only show the users that are moderators or administrators of your site, as they are the people that users will contact when having problems.

[spoiler][code linenumbers=false]
#----[OPEN]-----------------
groupcp.php
#----[SEARCH]--------------

if ( isset($_POST['mode']) || isset($_GET['mode']) )
{
	$mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode'];
	$mode = htmlspecialchars($mode);
}
else
{
	$mode = '';
}

#----[COMMENNT]------------
#
#Do only if you have the All users group active
#You will have to translate the message below
#
#----[AFTER, ADD]--------
//
// Memberlist privacity mod by novice programmer - BEGIN
//

if ( !$userdata['session_logged_in'] )
{
	if ( $_GET['g'] == 5 )
	{
		message_die(GENERAL_MESSAGE, 'This function is not available to registered and logged in users in order to respect the privacy of the users of this site. </br></br> Please contact the webmaster for more info. </br></br> We apologize for the inconvenience.');
	}
}

//
// Memberlist privacity mod by novice programmer - END
//

#----[OPEN]---------
memberlist.php
#----[SEARCH]------

// Memberlist sorting
$mode_types_text = array($lang['Fast'], $lang['Standard'], $lang['Staff'], $lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten'], $lang['Sort_Birthday'], $lang['Style'], $lang['Who_is_Online'], $lang['Sort_LastLogon']);
$mode_types = array('fast', 'standard', 'staff', 'joined', 'username', 'location', 'posts', 'email', 'website', 'topten', 'birthday', 'style', 'online', 'lastlogon');

if ( isset($_GET['mode']) || isset($_POST['mode']) )
{
	$mode = ( isset($_POST['mode']) ) ? htmlspecialchars($_POST['mode']) : htmlspecialchars($_GET['mode']);
}
else
{
	$mode = 'joined';
}

#----[AFTER, ADD]----
//
// Memberlist privacity mod by novice programmer - BEGIN
//

if (!$userdata['session_logged_in'])
	{
		if ( ($mode == 'fast') || ($mode == 'standard') || ($mode == 'joined') || ($mode == 'username') || ($mode == 'location') || ($mode == 'posts') || ($mode == 'email') || ($mode == 'website') || ($mode == 'topten') || ($mode == 'birthday') || ($mode == 'style') || ($mode == 'online') || ($mode == 'lastlogon') )
		{
			message_die(GENERAL_MESSAGE, 'This function is not available to registered and logged in users in order to respect the privacy of the users of this site. </br></br> Please contact the webmaster for more info. </br></br> We apologize for the inconvenience.');
		}
	}

if (!$userdata['session_logged_in'])
	{
		$mode_types_text = array ($lang['Staff']);
	}


//
// Memberlist privacity mod by novice programmer - END
//

#----[SAVE/CLOSE ALL FILES]-----
EoD
[/code][/spoiler]


