The following warnings occurred:
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/printthread.php 203 postParser->parse_message



GetSimple Support Forum
How do I access user data? - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: How do I access user data? (/showthread.php?tid=9579)



How do I access user data? - cobber - 2017-04-06

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?


RE: How do I access user data? - Carlos - 2017-04-07

You can use global $USR
Code:
<?php

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

?>



RE: How do I access user data? - cobber - 2017-04-07

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