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


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');


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

  • Your question is quite broad to give you an answer. Let us know what you have done till now. I would like to know how you going to send mails to users to invite them for registration? Are you going to send invitation mail to each user separately and manually? Commented Apr 7, 2015 at 9:25

2 Answers 2


Most components that allow user registration support sending an activation email to the user. The way this works is that you you register the user with necessary data, the component sends an activation email to the address you gave to the user, and the registration only becomes active then the user uses the activation link in the email.

You make no mention of what component you use so I can't even guess if it supports this directly or if you need to use something separate. In any case, you can check some component that does support this to see how to handle it.

  • The component is called iCagenda. I would need to modify it to do what I want, but I am just not sure where in a component one would typically place the sort of code I have above.
    – Brian
    Commented Mar 7, 2015 at 15:07

I ended up implementing this by having an event id appended to the url for event registration in the iCagenda joomla component. And in the registration view I do the necessary checking so that registration will only work when the id is present. Thanks!

Your Answer

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

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