Jump to content

Creating a full page login screen


adamb1995

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated