Page 1 of 1

Do something when the user logs in

Posted: Sun Sep 16, 2007 7:59 pm
by akb
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

Re: Do something when the user logs in

Posted: Tue Sep 18, 2007 12:43 am
by matthewhayashida
MOD NOTE: Moving to Joombie Q/A

Re: Do something when the user logs in

Posted: Sun Jan 20, 2008 11:55 pm
by edward_cox
Hello Arne,

did you receive any responses to your query? I am looking to do something similar (recording logindate and logoutdate to a new table for each user id login) and am lost for examples or pointers.

In fact I can't event locate the code for mosMainFrame::login to see where Joomla actual identifies and stores lastvisitDate for the user.

Thanks!

Ed.