Gossamer Forum
Quote Reply
User Login Hook
Which hook do I need to trap the instance when someone has been logged in?
Quote Reply
Re: [giovanni] User Login Hook In reply to
user_login


Example:

$mgr->install_hooks ( 'EditorMonitor', [ ['user_login', 'POST', 'Plugins::EditorMonitor::user_login', 'FIRST'] ]);

Where in this case it is a POST hook, as I want to perform action AFTER the users has logged in.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Aug 1, 2002, 9:14 AM
Quote Reply
Re: [Ian] User Login Hook In reply to
Thanks for the help Ian. It doesn't seem to be working for me though.

I have added the hook:

user_login PRE Plugins::Track::login FIRST

and then added the subroutine "login" in the Plugin. And then, just to test I have defined it as

Code:
GT::Plugins->action ( STOP );
print "Content-type:text/html\n\n";
print "Hook worked";






However, the "Hook worked" message never comes up. What am I doing wrong?

Last edited by:

giovanni: Aug 1, 2002, 9:20 AM
Quote Reply
Re: [giovanni] User Login Hook In reply to
Widen out to show the whole sub, is that it?

Don't forget you need:

my (@args) = @_;
.....

return @args;


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [giovanni] User Login Hook In reply to
Sorry to say the stupid things but you did actually install the plugin?
Quote Reply
Re: [Ian] User Login Hook In reply to
Great. It works now. Thanks Ian!