Jump to content
Sign in to follow this  
sokalsondha

logout redirect to login

Recommended Posts

hello community

i am using the latest whmcs v7

and i want my clients logout from the portal and then it will be redirect to the login page again. i mean i dont want they will see again the index.php file which is home page for SIX template

i found a tpl file which name logout.tpl

can some please help me with the correct code i need to modify

 

also just to added my whmcs is in the main public_html

there is no sub folder like http://yourdomainname.com/whmcs  i dont have like this my whmcs is in http://yourdomainname.com

 

thanks in advance

Share this post


Link to post
Share on other sites

Hello @sokalsondha,

Maybe this will help. 

Go to /templates/yourtemplate/logout.tpl and replace this code:

<div class="main-content">
        <p class="text-center">
            <a href="index.php" class="btn btn-default">{$LANG.logoutcontinuetext}</a>
        </p>
    </div>

with this code:

<div class="main-content">
        <p class="text-center">
            <a href="clientarea.php" class="btn btn-default">{$LANG.logoutcontinuetext}</a>
        </p>
    </div>

Cheers

Share this post


Link to post
Share on other sites
5 hours ago, dansk said:

Go to /templates/yourtemplate/logout.tpl and replace this code:

it would be better to use a ClientLogout hook to avoid repeatedly having to edit the template after an update - which is what I gave @sokalsondha on the day he posted. :!:

Share this post


Link to post
Share on other sites
On 7/22/2018 at 12:49 AM, dansk said:

Hello @sokalsondha,

Maybe this will help. 

Go to /templates/yourtemplate/logout.tpl and replace this code:


<div class="main-content">
        <p class="text-center">
            <a href="index.php" class="btn btn-default">{$LANG.logoutcontinuetext}</a>
        </p>
    </div>

with this code:


<div class="main-content">
        <p class="text-center">
            <a href="https://www.hickman.io/" class="btn btn-default">{$LANG.logoutcontinuetext}</a>
        </p>
    </div>

Cheers

I am using a modified version where i'm trying to redirect to "another website", from my subdomain to the root domain. I made the change, but for some reason it keeps going to the index file.

Share this post


Link to post
Share on other sites

if this were v8 and you needed to use a hook to redirect on logout, the ClientLogout hook point no longer exists, so it's UserLogout...

Share this post


Link to post
Share on other sites
9 minutes ago, Hickman.io said:

Okay, where should i place this hook?

/includes/hooks

Share this post


Link to post
Share on other sites
5 minutes ago, Hickman.io said:

Okay, and do I just create a new .php file or is there one I need to add it to?

create a new .php file, paste the above code into it, save and it should work immediately.

Share this post


Link to post
Share on other sites

@brian this hook will be fire befor logging user out, i am searching for a hook which will be fire after logout happened! can you help me?

Share this post


Link to post
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.

Sign in to follow this  

  • 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