GetSimple Support Forum

Full Version: How do I access user data?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
You can use global $USR
Code:
<?php

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

?>
(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.