Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I access user data?
#1
Been searching for hours and still can't see how to access user data like username etc.

Wanted to get the user name of logged in user and write that to another file just for testing purposes

Any ideas please?
Reply
#2
You can use global $USR
Code:
<?php

if ($USR) {
  echo 'Current user: ',$USR;
}

?>
Reply
#3
(2017-04-07, 00:37:35)Carlos Wrote: You can use global $USR
Code:
<?php

if ($USR) {
 echo 'Current user: ',$USR;
}

?>

Thanks Carols, I ended up using the
PHP Code:
get_cookie('GS_ADMIN_USERNAME'); 
but i suppose I could use USR too.
Reply




Users browsing this thread: 1 Guest(s)