MyBB Community Forums

Full Version: Admin Notes on users
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
still strange that my version does work.
I believe I've now found the cause of this error.

The installation instructions have been updated, but if you've already installed the mod, here's the fix.

Open member.php and find this block of code:

// Get admin notes
if($mybbuser['gid'] == 4)
{
	$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE uid='$uid'");
	while($user = $db->fetch_array($query))
	{
		$notes = stripslashes($user['notes']);
		if($notes == "")
		{
			$notes = "No admin notes on this user.";
		}
		eval("\\$adminnotes = \\"".$templates->get("member_profile_notes")."\\";");
	}
}
// End admin notes

Replace it with this block instead:

// Get admin notes
if($mybb['usergroup'] == 4)
{
	if(!empty($memprofile['notes']))
	{
		$notes = stripslashes($memprofile['notes']);
	}
	else
	{
		$notes = 'There are currently no admin notes on this user.';
	}
	
	eval("\\$adminnotes = \\"".$templates->get("member_profile_notes")."\\";");
}
// End admin notes

Although there was only a fault with one line of code, I rewrote most of it to save an extra query to the database which wasn't needed. Wink

Thanks for bringing this to my attention, and please do post back if you have any further problems. Smile
lol, aperently i already had this (with exeption of the extra query save) Smile

i really should write down, what things i mod Smile
Pages: 1 2