Try:
my $session = $IN->cookie($CFG->{cookie_prefix} . 'session') || $IN->param('session');
my $remember = $IN->cookie('forum_hash_remember');
if ($session) {
$record = $DB->table('session')->select( { session_id => $session })->fetchrow_hashref;
}
elsif ($remember) {
$record = $DB->Table('remember')->select( { session_id => $remember} )->fetchrow_hashref;
}
if ($record) {
$user_id = $record->{session_user_id};
}
else {
# not logged in
}
That needs a bit of tweaking, but I hope you get the idea. Basically you just need to grab the session cookie like you do the remeber cookie. The only tricky part is you need the config object to figure out the name of the session cookie.
Cheers,
Alex
--
Gossamer Threads Inc.
my $session = $IN->cookie($CFG->{cookie_prefix} . 'session') || $IN->param('session');
my $remember = $IN->cookie('forum_hash_remember');
if ($session) {
$record = $DB->table('session')->select( { session_id => $session })->fetchrow_hashref;
}
elsif ($remember) {
$record = $DB->Table('remember')->select( { session_id => $remember} )->fetchrow_hashref;
}
if ($record) {
$user_id = $record->{session_user_id};
}
else {
# not logged in
}
That needs a bit of tweaking, but I hope you get the idea. Basically you just need to grab the session cookie like you do the remeber cookie. The only tricky part is you need the config object to figure out the name of the session cookie.
Cheers,
Alex
--
Gossamer Threads Inc.