IP Subscription
Grant anonymous and authenticated users access to content, based on the users IP address.
Version 2 includes Google Analytics integration which requires:
Token
Google Analytics
Google Analytics Reports
NOTE: these modules have their own dependencies. Also the latest stable releases may be quite old, in which case the -dev release is recommended.
Configuring Google Analytics
Custom variables
Slot: 1
Name: ip_sub
Value: [ip_subscription_uid]
Scope: Session
Also file extensions to track may need to be extended.
Anonymous user roles
The key to granting user roles to anonymous users is the permissions cache - this is a cache mapping user ids to permissions. The issue is that we need multiple anonymous users to have individual permissions. So we need to prevent these from being cached.
This can be achieved by modifying the appropriate call to user_access().
--- return user_access($string, $account);
+++ return user_access($string, $account, true);
The 'true' argument resets the cache.