Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Question about variables in PHP Fusion 9

While coding PHP in custom pages in PHP Fusion 7 I used $userdata['user_name']; to get the current user. In PHP Fusion 9 this seems not to be around. So my question is how to get the logged in username now adays.

Thank you in advance!
In v9 you must first declare variable


$userdata = fusion_get_userdata();
echo $userdata['user_name'];

// or
echo fusion_get_userdata('user_name');

And if you need get settings

$settings= fusion_get_settings();
echo $settings['sitename'];

// or
echo fusion_get_settings('sitename');

Thread Information
Posted In
2 posts
440 times
Last Post
Last updated on 1 year ago
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
Users who participated in discussion: RobiNN, Oskman