I created a new field called user_lastcategory, which contains the number of the last category the user viewed the last time he/she was online.
How do I send the user to that category when he/she logs in?
I looked at the login part of user.pm but the various combinations I tried did not work. The original code is below - is this what has to be changed, and if so, how? Thank you very much for your help.
$COMPILE{login} = __LINE__ . <<'END_OF_SUB';
sub login {
shift; # Discard the package
my ($do, $func) = splice @_, 0, 2;
my $tags = ref $_[0] eq 'HASH' ? shift : {};
my $url = $CFG->{cgi_root_url} . "/" . $IN->url();
$url =~ s/(?:[;&]?(?:login_(?:username|password|attempt)|url|session|guest)=[^&;]*|\b(?:login_(?:username|password|attempt)|url|session|guest)=[^&]*)//g;
$url =~ s/\bdo=log(?:in|out)\b//g;
$url =~ s/\?/?login_attempt=1&/ or $url .= "?login_attempt=1";
$tags->{url} = $url;
delete @GForum::HIDDEN{qw/guest login_username login_password session/};
return(
$CFG->{functions}->{login}->{page}->{login},
$tags
);
}
END_OF_SUB
How do I send the user to that category when he/she logs in?
I looked at the login part of user.pm but the various combinations I tried did not work. The original code is below - is this what has to be changed, and if so, how? Thank you very much for your help.
$COMPILE{login} = __LINE__ . <<'END_OF_SUB';
sub login {
shift; # Discard the package
my ($do, $func) = splice @_, 0, 2;
my $tags = ref $_[0] eq 'HASH' ? shift : {};
my $url = $CFG->{cgi_root_url} . "/" . $IN->url();
$url =~ s/(?:[;&]?(?:login_(?:username|password|attempt)|url|session|guest)=[^&;]*|\b(?:login_(?:username|password|attempt)|url|session|guest)=[^&]*)//g;
$url =~ s/\bdo=log(?:in|out)\b//g;
$url =~ s/\?/?login_attempt=1&/ or $url .= "?login_attempt=1";
$tags->{url} = $url;
delete @GForum::HIDDEN{qw/guest login_username login_password session/};
return(
$CFG->{functions}->{login}->{page}->{login},
$tags
);
}
END_OF_SUB