You are here

function restrict_by_ip_user_admin_perm_validate in Restrict Login or Role Access by IP Address 6.2

Hook for the permissions validate function. Checks to make sure the ip-address is valid.

1 string reference to 'restrict_by_ip_user_admin_perm_validate'
restrict_by_ip_form_user_admin_perm_alter in ./restrict_by_ip.module
Hook to the admin_permissions form

File

./restrict_by_ip.module, line 50
Allows the admin to select which ip addresses role or a user can login from for this site Some of the code below is taken from the cck_ipaddress_module

Code

function restrict_by_ip_user_admin_perm_validate($form, &$form_state) {

  // Seperate the ip address by semi-colon delimiter
  $ret = TRUE;
  $sms = "Retrict by IP Address setting not updated to role";
  if ($form_state['values']['rip']['restrict_by_ip_type']) {
    $ret = _restrict_by_ip_validate_ip($form_state['values']['restrict_by_ip_address'], $sms);
  }
  return $ret;
}