I am thinking about moving my site to Drupal, but I need to know a few things. The most important is can I use the drupal logins created by users to control access to other parts of my site. Also, is the username easily stored in a session variable so I can use that login to control some dynamic content?

Thanks.

Comments

yelvington’s picture

There are several approaches to integrating legacy/external systems with Drupal authentication. The easiest is to write a (very simple) module that packs the information you want to transport into a cookie, ideally in an encrypted format, and a companion for your legacy application that unpacks the data. We do something like that in integrating our (remotely hosted) photo gallery application with Drupal; additionally we perform an authentication step through an XML conversation between the systems. It took less than a day to implement.

Drupal stores all persistent data in PHP sessions that are placed in the database, not in the filesystem (as is common for PHP). As a result, you can't use PHP on the same server to retrieve the data without including the Drupal bootstrap.

shawn dearmond’s picture

Look at the Content Access module. It lets you set access at the node level.
http://drupal.org/project/content_access

There's also the Taxonomy Access module that lets you set access at the category level:
http://drupal.org/project/taxonomy_access

Be very careful about using both of them at the same time.