I need to customize a method in a component. I need to make different action (deleting a user and other info) and then logout the user programmatically (not with a button link), how can I achieve this?
I've tried to do this at the end of the method:
$return = JRoute::_('index.php?option=com_users&task=user.logout', true);
$this->setRedirect($return,$msg);
But this gives a invalid token message.
Thanks