Do something when the user logs in
Posted: Sun Sep 16, 2007 7:59 pm
Hi there,
I'd like to write a small plugin that gives the user some points every day he logs in. So I need to play around with events and it already almost works when using the onLoginUser() event. But there is one small problem with this: When onLoginUser() is triggered, the /plugins/user/joomla.php is already triggered and therefor the lastvisitDate is already updated. But I need to know the date of the last visit and not the already updated one. Any idea?
Regarding to this I also took a look at the onAuthentication() event, but I don't know how to use them. Could it be I could also do it using this event? But how? Do the authentication plugins have to be related to other authentication services than joomla itself, as the /plugins/authentication/joomla.php is already defined?
Hope there's someone who can help me with this.
Thanks in advance :-)
Arne
I'd like to write a small plugin that gives the user some points every day he logs in. So I need to play around with events and it already almost works when using the onLoginUser() event. But there is one small problem with this: When onLoginUser() is triggered, the /plugins/user/joomla.php is already triggered and therefor the lastvisitDate is already updated. But I need to know the date of the last visit and not the already updated one. Any idea?
Regarding to this I also took a look at the onAuthentication() event, but I don't know how to use them. Could it be I could also do it using this event? But how? Do the authentication plugins have to be related to other authentication services than joomla itself, as the /plugins/authentication/joomla.php is already defined?
Hope there's someone who can help me with this.
Thanks in advance :-)
Arne