Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('DRUPAL_ROOT',$_SERVER['DOCUMENT_ROOT']);includes/bootstrap.inc file
- require_once DRUPAL_ROOT.'includes/bootstrap.inc';
- drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
- global $user;
- if(user_is_logged_in()){
- echo "logged";
- } else {
- echo "not logged";
- }
- ?>
- object(stdClass)#17 (4) {
- ["uid"]=>
- int(0)
- ["hostname"]=>
- string(12) "XXX.XXX.XX.X"
- ["roles"]=>
- array(1) {
- [1]=>
- string(14) "anonymous user"
- }
- ["cache"]=>
- int(0)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement