Checking Drupal authentication from external PHP

Posted by peppergrower on Stack Overflow See other posts from Stack Overflow or by peppergrower
Published on 2010-03-22T22:55:52Z Indexed on 2010/03/22 23:01 UTC
Read the original article Hit count: 323

Filed under:
|
|

This may well be simple, but I'm new to Drupal. The organization I work for switched to Drupal a little while ago, but there's still some legacy code in various external PHP files that would be cumbersome to convert over to work within Drupal.

However, it would be very nice to be able to restrict access to some of these pages based on a person being authenticated against Drupal. (Some pages are administrative and are currently visible to anyone who knows the URL, for instance. Yes, poor design, but that's what I inherited...)

How can I check with Drupal, from an external PHP file, to see if the person visiting a given page has authenticated?

© Stack Overflow or respective owner

Related posts about drupal

Related posts about php