Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. define('DRUPAL_ROOT',$_SERVER['DOCUMENT_ROOT']);includes/bootstrap.inc file
  3. require_once DRUPAL_ROOT.'includes/bootstrap.inc';
  4. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  5. global $user;
  6.  
  7. if(user_is_logged_in()){
  8. echo "logged";
  9. } else {
  10. echo "not logged";
  11. }
  12. ?>
  13.  
  14. object(stdClass)#17 (4) {
  15. ["uid"]=>
  16. int(0)
  17. ["hostname"]=>
  18. string(12) "XXX.XXX.XX.X"
  19. ["roles"]=>
  20. array(1) {
  21. [1]=>
  22. string(14) "anonymous user"
  23. }
  24. ["cache"]=>
  25. int(0)
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement