1
votes

I was developing a component in joomla 2.5 which has a total 2 pages, after first page user will be redirected to login page if he is not logged in. The data we got from the first page needs to be saved temporarily and saves to database only after successful login.

so in order to do that we did some code changes inside site_root/components/com_users/views/login/tmpl

and modified default.php to recive our ajax call and send the temp data after succeful login..

now we need to upgrade it to joomla 3.0 ,

what is the right way to deal with these kind of problems? is there any other way that I can work with joomla login component so that I could fulfill the abvove requirements(by not messing with the core joomla code)?? Plese help with your valuable suggestions....

1

1 Answers

0
votes

You should not modify the Joomla core files.

To make this kind of change you should be using plugins and events like onAfterLogin etc.

There is pretty good documentation about this here: http://docs.joomla.org/Plugin

And I can really recommend this book about plugin development if you would like to really understand the power of plugins.

https://www.yireo.com/books/programming-joomla-plugins-book