This project is not covered by Drupal’s security advisory policy.
GeoIP Role allows to dynamically grant roles to the current user according to his IP address location.
It depends on the GeoIP API module.
Currently, GeoIP Role allows to attach countries to roles, thus defining geographical zones.
When a user visits your site, he dynamically gain the role(s) attached to the country reported by his IP address.
GeoIP Role may be used with any other module like Nodeaccess that controls access based on user roles.
Requirements
- PHP 5.1.0 or greater
- GeoIP API
Installation
Copy the geoip_role folder to your sites/all/modules directory.
Navigate to admin/build/modules and enable the module.
Configuration
Navigate to admin/user/roles and create the roles to be controlled exclusively by GeoIP Role.
Go to admin/settings/geoip_role.
Under Controlled roles, check the roles you have just created.
Country list file path: by default, GeoIP Role reads the country list from the URL http://www.iso.org/iso/iso3166_en_code_lists.txt.
It is recommended to manually download this file and to copy it into your sites/all directory.
You should then enter sites/all/iso3166_en_code_lists.txt as the path.
Save settings and click on the Country roles tab.
Check the role(s) you want given for each listed country.
Save settings, that's it!
Contact
This module is sponsored by Absyx.
If you like this module, please review it and add it to favorites at drupalmodules.com.
Project information
- Module categories: Access Control, Site Structure
- Created by anrikun on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.