Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Re: [Alex] Identifying a user....

Quote Reply
Re: [Alex] Identifying a user.... In reply to
Hi Alex,

Thanks for getting back so soon... here's the problem... this code snippet, in a totally independent script, works fine if I have logged in using the 'Remember Me' OR the 'Don't use cookies' options, however if I log in and select neither option the cookie is not found...

Code:

if (my $cookie = $IN->cookie('forum_hash_remember')) {

$record = $DB->table('gforum_remember')->select( { session_id => $cookie } )->fetchrow_hashref;

} elsif ($input->{session}) { # grabbed from query

$record = $DB->table('gforum_session')->select( { session_id => $input->{session} } )->fetchrow_hashref;
}

my $USER_ID = "$record->{session_user_id}";

$record = $DB->table('gforum_user')->select( { user_id => $USER_ID } )->fetchrow_hashref;

my $USER_NAME = "$record->{user_username}";


Cheers,

Trav.


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Subject Author Views Date
Thread Identifying a user.... moog 1765 Sep 5, 2002, 5:00 AM
Thread Re: [moog] Identifying a user....
Alex 1719 Sep 5, 2002, 11:37 AM
Thread Re: [Alex] Identifying a user....
moog 1691 Sep 5, 2002, 1:36 PM
Thread Re: [moog] Identifying a user....
Alex 1691 Sep 5, 2002, 1:41 PM
Post Re: [Alex] Identifying a user....
moog 1664 Sep 6, 2002, 12:00 PM