Image Caption

Thursday, August 2, 2012

Joomla redirect after email activation

[Note: Tested in Joomla 2.5]
Step:1
Open the file: home directory/components/com_users/controllers/registration.php


Step:2
Search the below code near line:68


if ($useractivation == 0)
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_SAVE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false));
}
elseif ($useractivation == 1)
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_ACTIVATE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false));
}
elseif ($return->getParam('activate'))
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_VERIFY_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration&layout=complete', false));
}
else
{
$this->setMessage(JText::_('COM_USERS_REGISTRATION_ADMINACTIVATE_SUCCESS'));
$this->setRedirect(JRoute::_('index.php?option=com_users&view=registration&layout=complete', false));
}

Step:3

After email activation. set Custom redirect to home page

$this->setRedirect('index.php');

Replace the below line with above code

$this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false));



5 comments:

Anonymous said...

Thanks, very useful, since all Redirection plu-ins have failed, as long as there is a menu item that points to the user profile.

Anonymous said...

omg... thanksssssss a lot...

Anonymous said...

EXTREMELY helpful!!!! THANKS!!!!

Anonymous said...

Thanks...very helpful

Anonymous said...

Thank you for this. Saved me some time. Now I just need to check / re-edit this after each Joomla update!