Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

user's favourite category

Quote Reply
user's favourite category
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/};






Subject Author Views Date
Thread user's favourite category tora 2838 May 27, 2003, 1:35 AM
Thread Re: [tora] user's favourite category
Andy 2774 May 27, 2003, 7:44 AM
Post Re: [Andy] user's favourite category
tora 2754 May 27, 2003, 4:46 PM