0

I want to add some data, when user just login and remove this data, when he logout by himself or by the end of lifetime. Where is the script of checking lifetime situating? Joomla 3.8

2
  • 1
    I'd suggest creating a plugin and using the onUserAfterLogin and onUserLogout events.
    – Lodder
    Aug 24, 2018 at 14:59
  • @Lodder I create new content plugin, add onUserAfterLogin method, but can't understand how it call and when. Never used plugins before. Maybe you can explain please? Aug 26, 2018 at 5:48

1 Answer 1

2

Content plug-in does not have events for the user the events onUserAfterLogin you want to use can only be used in user, authentication or system plug-in try changing your plug-in to one of these types. Each different type of plug-in are used for different situations like system plug-in can be used for all events, but as you are performing some task on user events I will suggest you use User plug-in. Also, go through the different types of plug-in and events related to them.

https://docs.joomla.org/Plugin/Events

Hope this helps.

1
  • I used native joomla authentification plugin. Thnx Aug 29, 2018 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.