Which hook do I need to trap the instance when someone has been logged in?
Aug 1, 2002, 9:12 AM
Veteran / Moderator (2577 posts)
Aug 1, 2002, 9:12 AM
Post #2 of 6
Views: 2990
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
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
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
print "Content-type:text/html\n\n";
print "Hook worked";
However, the "Hook worked" message never comes up. What am I doing wrong?
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?
Aug 1, 2002, 9:22 AM
Veteran / Moderator (2577 posts)
Aug 1, 2002, 9:22 AM
Post #4 of 6
Views: 2954
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
Don't forget you need:
my (@args) = @_;
.....
return @args;
http://www.iuni.com/...tware/web/index.html
Links Plugins