I have a very simple external php script which will not return the userId. The script is posted below:
<?php include_once "/includes/bootstrap.inc"; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); global $user; $userId = $user->uid; echo $userId; ?>
This script returns an empty string, and I cannot figure out why. Any help would be appreciated.
Note: I have checked to make sure bootstrap.inc is located in the correct directory. I've made sure the directory is accessible. This should be an easy process, but for some reason I just can't return the userId of the currently logged in user..