I have this code below that I want to redirect them to home if they are logged in, but I just don't know how to go about it.. what is the best way to redirect a user, the fastest and best way overall inside a tpl file?
{if isset($smarty.session.user.id)} redirect here? {/if}
How can I do this? and what is the best way...
The best way is not doing it in a smarty template, but on the php script. If for some reason you can't do it, use javascript inside the {if}, i.e.
window.location = "http://www.yoururl.com";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With