I am new to Joomla! development. I have an event management component that I am modifying. One of the views of the component is for event registration. I want to make registration private, and want to be able to send an email to invitees so that they click a url in the email and it takes them to the registration page. My current understanding is that this will not work since the registration page starts with
defined('_JEXEC') or die();
The component author suggested that I can create an admin account, say with user $user and pw $pw and that in the email inviting people to register I could use a url of the form
http://url-to-the-event/registration?u=username&p=password
If I do that, seems somewhere I would have to add the following:
$jinput = JFactory::getApplication()->input;
$params= $jinput->getArray(array('u' => '', 'p' => ''));
$result = JFactory::getApplication()->login($params));
Is that correct? Where in a component structure would I do that? In the controller of the component I see this
$safeurlparams = array('catid'=>'INT','id'=>'INT','Itemid'=>'INT','cid'=>'ARRAY','year'=>'INT','month'=>'INT','limit'=>'INT','limitstart'=>'INT', 'showall'=>'INT','return'=>'BASE64','filter'=>'STRING','filter_order'=>'CMD','filter_order_Dir'=>'CMD','filter-search'=>'STRING','print'=>'BOOLEAN','lang'=>'CMD');
parent::display($cachable,$safeurlparams);
So seems there is some existing Joomla! structure to facilitate what I want to do, but I am not sure where exactly to make changes. And I know this approach is perhaps non-ideal, to be having login info in a url... So I am also open to suggestions on how best to do this.
Any help is appreciated! Brian