help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Mailer plugin and site login

Re: Mailer plugin and site login

5 years 7 months ago
#26143
Fair point, I've done this now (the redirect goes to my calendar home as opposed to a 404 if they are already logged in and try a missing event URL):

if (empty($data)) {
//Check if user is logged in
$uid = $user->id;
if ($uid == 0) {
$app =& JFactory::getApplication();
$app->redirect('index.php?option=com_users&view=login&return=' . base64_encode('index.php?option=com_jem&view=event&id='.$pk));
} else {
$app =& JFactory::getApplication();
$app->redirect('calendar');
//throw new Exception(JText::_('COM_JEM_EVENT_ERROR_EVENT_NOT_FOUND'), 404);
}
}
The following user(s) said Thank You: depebo

Please Log in or Create an account to join the conversation.

Time to create page: 0.475 seconds