Hi all, what is the recommended way to pass state in between calls of functions of a plugin?
As an example.. lets say I want to show the last login of a user in a template. I create a template object, hook into it through plugin api, and add the last login to the content var. But the last_login info from the user object is already modified by then to be the current login time/date. So I need to grab this info at an earlier hook (login_after), and then pass it to the template hook. (btw, the example userinfo plugin also fails here..it shows the current login time).
Im using a cookie now, but im wondering if there isnt a better way. I cant just create an object variable ($this->last_login) because the data is wiped between login_after and template_object_*.
Also, is there some uniform way to save permanent longterm data as a plugin without having to build my own DB query?
Regards,
Cor