Read before updating: How to Update Kunena Templates - More detail

How to redirect to home page after logout?

Huyen Nguyen's Avatar Topic Author
Moderator Moderator
  • Posts: 558
  • Thanks: 140

How to redirect to home page after logout?

7 years 11 months ago - 7 years 11 months ago
#11385
Hi all,

Some users ask us about "How to redirect to home page after logout?". Our developer has researched and suggest a good solution for you. So you need hack to your current template, follow some bellow steps to do it.

- Step 1: Open the default.php file in the "template\[your_kunena_template]\layouts\widget\login\logout" path.
- Step 2: Add new line code (middle line).
Code:
<input type="hidden" name="task" value="logout" /> <input type="hidden" name="return" value="<?php echo base64_encode(JURI::root()); ?>" /> <?php echo JHtml::_('form.token'); ?>
- Step 3: Save and try to logout on your forum.

We tried to on our local and it worked fine. Hope this tip helpful with you.
Huyen Nguyen
Nice Theme Store's Support Department.
Support email: 9themestore[at]gmail.com
** Please post your site url here if it has been lived **
Last edit: 7 years 11 months ago by Huyen Nguyen.

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

Time to create page: 0.365 seconds