2013-09-25, 08:19 PM
Hi could you please check this code ad tell me why it doesn't work. It doesn't check the IP it just blocks the user!
functions_user.php
member.php
X and Y is where I put group ID
functions_user.php
// REGIP = new param
$query = $db->simple_select("users", "uid,username,password,salt,loginkey,usergroup,regip", "uid='".intval($uid)."'", array('limit' => 1));
$user = $db->fetch_array($query);
}
if(!$user['salt'])
{
member.php
elseif($user['usergroup'] == X || $user['usergroup'] == Y)
{
$currentip = $_SERVER['REMOTE_ADDR'];
if ($currentip != $user['regip'])
{
$errors[] = "Cannot log you in!";
}
}
X and Y is where I put group ID