if i want to overwrite the default login url which i have set in the backend, it still returns to the url from the backend.
I followed the instructions from this tutorial:
http://docs.joomla.org/How_do_you_redir ... Overriding
My redirection code:
Code: Select all
$this->app = JFactory::getApplication();
$this->user = JFactory::getUser();
if ($this->user->get('guest') == 1)
{ // Redirect to login
$this->app->enqueueMessage(JText::_('COM_MYCOMPONENT_USER_LOGIN_FIRST'), 'notice');
$redirectUrl = '&return=' . urlencode(base64_encode("index.php?option=com_mycomponent&view=cart"));
$this->app->redirect(JRoute::_('index.php?option=com_users&view=login' . $redirectUrl));
return;
}
Path /components/com_users/views/login/tmpl/default_login.php
In my opinion this doesn't make sense or am wrong?<input type="hidden" name="return" value="<?php echo base64_encode($this->params->get('login_redirect_url', $this->form->getValue('return'))); ?>" />
Kind regards,
Qlimax