Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
for drupal 6 I wrote a module, which assigned a role to the anonymous user (automaticaly, without login).
It was the hook_init and it worked with the taxonomy access control module.
function mymodule_init(){
if($GLOBALS['user']->uid==0){
$GLOBALS['user']->roles[17] = "my_role";
Now in the TAC-Version for Drupal 7, it does not work anymore.
It seems that TAC gets the roles before the hook_init is done.
Is this right?
In which hook I should insert my roles-assignement to get TAC to read it?
Thanks and regards
Adriana