Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Current user

Quote Reply
Current user
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


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.
Subject Author Views Date
Thread Current user afinlr 2097 Mar 8, 2004, 2:44 PM
Thread Re: [afinlr] Current user
Jagerman 2031 Mar 8, 2004, 6:21 PM
Post Re: [Jagerman] Current user
afinlr 2019 Mar 9, 2004, 4:47 AM