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/};






Quote Reply
Re: [tora] user's favourite category In reply to
What about;

print "Location: xxxx \n\n";


Andy (mod)
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] user's favourite category In reply to
Thanks, but that does not help.

There has to be a change to the url the user goes to after logging in. Now all users go to the main category listing. I want my users to be able to go to their favourite category automatically.