Gossamer Forum
Home : Products : Others : Gossamer Community :

confused about GComm & cookies

Quote Reply
confused about GComm & cookies
Hi,

When a person logs into GComm is their username stored in the session cookie? If so can someone provide me the code I would use to access it?

Thanks,
Mike

Last edited by:

Swaylock: Mar 30, 2004, 4:57 PM
Quote Reply
Re: [Swaylock] confused about GComm & cookies In reply to
Answered my own question:

Yes and here's some code:

#!/usr/bin/perl

use CGI::Cookie;
my %cookies = fetch CGI::Cookie;

print "<H1>Hello World</H1>\n";
my $cv = $cookies{'Community_Name'}->value;
print "Here it is!!!: $cv;\n";
Quote Reply
Re: [Swaylock] confused about GComm & cookies In reply to
You probably already know this, but I'll tell you anyway :)

The cookie will only be valid on the domain that it was set on. I had this problem with trying to get GComm to work on several different sites, but it obviously didn't work, mainly due to cookie limitations, and not really GComm :(

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!