You are here

function _restrict_by_ip_hash_role_name in Restrict Login or Role Access by IP Address 7.3

Certain characters will be automatically converted to underscores by PHP when included in a form name. Example <input name="a.b" /> becomes $_POST["a_b"].

We can hash the role name to avoid discrepancies between the form elements and $_POST and still allow exportability of the configuration between sites.

See also

http://php.net/manual/en/language.variables.external.php

10 calls to _restrict_by_ip_hash_role_name()
RestrictByIpRoleTests::testRoleAppliedMatchIP in ./restrict_by_ip.test
RestrictByIpRoleTests::testRoleDeniedDifferIP in ./restrict_by_ip.test
RestrictByIpRoleTests::testUIRoleDeleted in ./restrict_by_ip.test
RestrictByIpRoleTests::testUIRoleRenamed in ./restrict_by_ip.test
RestrictByIpUITests::testRoleByIpSettingsSubmit in ./restrict_by_ip.test

... See full list

File

./restrict_by_ip.module, line 633
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_hash_role_name($name) {
  return md5($name);
}