adamb1995 Posted August 3, 2018 Share Posted August 3, 2018 Hi all, I'm trying to create a closed off WHMCS system where the user cannot view any pages on the site unless they are logged in. Im trying to customise the login page so its simply a login form, with a coloured background, rather than have the header and footer information on it. I've looked at the template files but cannot seem to understand how they work. Would anyone be able to nudge me in the right direction Thanks adam 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted August 3, 2018 Share Posted August 3, 2018 Read Creating Pages and make sure that you redirect visitors to login page with an Action Hook like follows: <?php function somePrefix_ClientAreaPage($vars) { if (!$vars['loggedin'] AND !in_array($vars['filename'], array('clientarea', 'register', 'pwreset'))) { header('Location: clientarea.php'); } } add_hook('ClientAreaPage', 1, 'somePrefix_ClientAreaPage'); Create a file with this content and upload it to includes/hooks directory. All visitors will be redirected to login page unless they're already viewing login page or trying to register / reset their password. 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.