muchos Posted July 6, 2009 Share Posted July 6, 2009 I want users to register before they can see the order/cart process. Something like this? {if !$loggedin} redirect => register.php {else} rest of code.. {/if} Thanks 0 Quote Link to comment Share on other sites More sharing options...
muchos Posted July 6, 2009 Author Share Posted July 6, 2009 Resolved: {if !$loggedin} {php} header('Location: /register.php'); {/php} {/if} 0 Quote Link to comment Share on other sites More sharing options...
gmorales Posted July 13, 2009 Share Posted July 13, 2009 Ey! that's interesting - I'm looking for something that would make the client area restricted to only members. This code seems fine, but I am not sure where I should put it. Can someone advice? Thank you 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted July 16, 2009 WHMCS Support Manager Share Posted July 16, 2009 I'd hazard a guess and put : {if !$loggedin} in header.tpl and {/if} in footer.tpl 0 Quote Link to comment Share on other sites More sharing options...
ukeagle Posted April 17, 2013 Share Posted April 17, 2013 Resolved: {if !$loggedin} {php} header('Location: /register.php'); {/php} {/if} Hi I have tried placing the above code inside cart.php to prevent none logged in users from accessing cart.php but i have got an error Also i have tried to place it inside the header but nothing happened! I have alos tried : if ($_SESSION['uid']) { # User is Logged In - put any code you like here }else{ $goto="login"; include("login.php"); } ?> And: {if !$loggedin} {php} header('Location: https://mywebsite.com /register.php'); {/php} Also no luck! Any suggestions please? WHMCS V5.2 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.