I am trying to force anonymous uses into roles by doing something like this:

$GLOBALS['user']->roles[sizeof($GLOBALS['user']->roles)+2] = "anonymous KNOWN IP";

However it seems that nodeaccess doesn't lookup the $GLOBALS['user'] array. Do I need to force a visitor into a "User" account and not just a role?

I am forcing the user into a role only if they have an ip address within a certain range (an intranet schema).

Comments

beekerstudios’s picture

Status: Active » Fixed

I figured out that auto-logging in a user to a specific user account and having that user in a role resolved this.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.