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...
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.
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.