MyBB Community Forums

Full Version: moderators can login from their ip only?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi there

how can i set only one ip to login from my moderators?

please help

thanks
This is possible with a plugin, but I wouldn't suggest you to do so. If IPs are dynamic then they'll change dynamically and your moderators wouldn't login until they've the same set of octates recorded in db.
This is extremely impractical, because most people now have dynamic ip addresses.
If you still want to do this, in 'member.php' above
if(!empty($errors))
add
	//array of usergroups that are restricted based on IP Address
	$ugroups = array(3,4,6);
	if($session->ipaddress != $user['regip'] && in_array($user['usergroup'], $ugroups))
	{
		$errors[] = "You cannot login from this IP address";
	}