I've written some scripts to run extra pages on my forum. I'm having a problem with getting the username of the current user. The scripts are run through the forum so that they only give access to members of a group - so I know that the people using the page must be logged on.
I have
use GForum qw/:forum :user $IN $DB $CFG $USER $GUEST/;
GForum::init ('/home/sites/site4/web/perl/admin'); # Required
at the top of the script and
GForum::authenticate();
within the sub. But $USER->{'user_username'} does not exist for some people.
Any suggestions?
I'm also using <%if user_username eq $Member%>stuff<%endif%> and they don't see the stuff so I can only guess that user_username really isn't set.
I've tried using $USER->{'current_user_username'} in the script but that doesn't work.
I have
use GForum qw/:forum :user $IN $DB $CFG $USER $GUEST/;
GForum::init ('/home/sites/site4/web/perl/admin'); # Required
at the top of the script and
GForum::authenticate();
within the sub. But $USER->{'user_username'} does not exist for some people.
Any suggestions?
I'm also using <%if user_username eq $Member%>stuff<%endif%> and they don't see the stuff so I can only guess that user_username really isn't set.
I've tried using $USER->{'current_user_username'} in the script but that doesn't work.