function _commerce_file_license_property_ip_check_access in Commerce File 7
Check Callback for License IP Addresses
Return value
TRUE access is allowed
1 string reference to '_commerce_file_license_property_ip_check_access'
File
- ./
commerce_file.commerce.inc, line 215 - Implementations of Commerce Hooks
Code
function _commerce_file_license_property_ip_check_access($license, $limit_value) {
$current = _commerce_file_license_property_ip_current($license);
if (isset($current) && is_numeric($limit_value)) {
$ip = ip_address();
return $current < $limit_value || in_array($ip, $license->addresses);
}
return FALSE;
}