function userone_check_ip in User One 6
Check if remote ip address is in the allowed list.
1 call to userone_check_ip()
File
- ./
userone.module, line 176 - User One module.
Code
function userone_check_ip() {
if ($ips = variable_get('userone_ip', '')) {
$ips = explode("\n", str_replace("\r", '', $ips));
foreach ($ips as $ip) {
if (strpos($_SERVER['REMOTE_ADDR'] . '.', "{$ip}.") === 0) {
return TRUE;
}
}
return FALSE;
}
return TRUE;
}