Is it possible to pull out the logged in user name via a page with it's filter type set to full php?

I don't want to do a full module, I just need the username or user ID so I can pull up some other info in a table I added that has the
user id (uid) as the pk and the username as a unique id.

Thanks,

Tony

Comments

efolia’s picture

You can access the $user variable by declaring it global in your code. You can then retrieve all the info you want from that variable and do whatever you please with it.

<?php 
  global $user; 
  print_r ($user); // this will print out the whole $user array
?>

have fun :-)

efolia