By sire on
I tried to create a php node type with Drupal, it has a form that is posted to. However, posting to the node works but doesn't keep the theme. Next, I pulled the code out into a static .php page seperate from Drupal but still want to restrict it to the 'superuser' role that I've created. How can I test if the user is logged in and has access to this role with Drupal ? Are there any examples ?
Comments
Check out this block snippet
The block snippet at http://drupal.org/node/27690 shows how to check to see if the current user has the assigned role.
Thanks.Do you know which
Thanks.
Do you know which drupal files will need to be included for that to work outside of Drupal nodes ? include('common.inc') and others ?
or ... If I could figure out why posting to the drupal node doesn't retain the theme, that would be ideal.