Wednesday, July 11, 2012

Add role to anonymous user programmatically

Although some people may oppose to add additional role to anonymous user in drupal, if you want to do it anyway because you want anonymous user has rights to access some area of your site. Here is some code snippet you can use: