MyBB Community Forums

Full Version: Brain Freeze lol
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im using this function to replace all posts with a message for specific users:

// Run plugin
function userpoblker_run($post)
{
	global $db, $mybb, $uid, $userpoblker, $usergroup, $groupscache;

	$gid = $mybb->user['uid'];
	$xgid = explode(",",$mybb->settings['userpoblker_1']);
	$usergrpmess = $mybb->settings['userpoblker_2'];

		if (!in_array($gid,$xgid))
		{
            $post['message'] = $usergrpmess;
		}
	}    

Normally when i use :
$xgid = explode(",",$mybb->settings['userpoblker_1']);
it allows the user to select the usergroups/users that they dont want to see this message , but for some reason its doing the reverse?

I have to enter the user/usergroup ID to allow them to see the message Confused
Change !in_array to in_array...??
Blush

Ive been looking at that for 4 hours and i was just about to start losing my mind.

Thanks alot matt Big Grin