jbougeno Posted June 16, 2008 Share Posted June 16, 2008 I would like to have users redirected back to my main website (NOT WHMCS or Client Area) when they hit the Logout button. I have them logging into the Client Area from my website and when they are finished, I'd like them to end up back at my website. In trying to implement this, I looked at the logout.tpl and logout.php files. The logout.php file appears to be encrypted so nothing to change there. Tried changing the logout.tpl and the change didn't work. Is it possible to implement this and if so, how? Thanks. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 16, 2008 WHMCS CEO Share Posted June 16, 2008 Try using the logout action hook in includes/actionhooks.php Matt 0 Quote Link to comment Share on other sites More sharing options...
jbougeno Posted June 16, 2008 Author Share Posted June 16, 2008 That worked. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
BizGlobalSolutions Posted June 23, 2008 Share Posted June 23, 2008 Where do I find the code for logout as I dont see in actions hook Thx 0 Quote Link to comment Share on other sites More sharing options...
Jako Posted June 25, 2008 Share Posted June 25, 2008 Where do I find the code for logout as I dont see in actions hook Thx It's in the includes folder. Should be right at the top if you list alphabetically. function actionhook_ClientLogout($vars) { # This function runs when a client logs out # $vars["ClientID"] } 0 Quote Link to comment Share on other sites More sharing options...
jnet Posted June 26, 2008 Share Posted June 26, 2008 thanks what to change in here? function actionhook_ClientLogout($vars) { # This function runs when a client logs out # $vars["ClientID"] } 0 Quote Link to comment Share on other sites More sharing options...
prashant Posted April 7, 2009 Share Posted April 7, 2009 i have the same question, what do i have to change in function actionhook_ClientLogout($vars) { # This function runs when a client logs out # $vars["ClientID"] } to logout to the home page? 0 Quote Link to comment Share on other sites More sharing options...
jbougeno Posted April 8, 2009 Author Share Posted April 8, 2009 Have you tried removing the comment tag? --> This symbol: # from this line? # $vars["ClientID"] So that it looks like this: $vars["ClientID"] 0 Quote Link to comment Share on other sites More sharing options...
prashant Posted April 8, 2009 Share Posted April 8, 2009 No i haven't tried.. but would removing # redirect to my domina's home page? 0 Quote Link to comment Share on other sites More sharing options...
solcre Posted April 17, 2009 Share Posted April 17, 2009 How can i login my clients without using dologin.php ? 0 Quote Link to comment Share on other sites More sharing options...
cubemedia Posted July 5, 2009 Share Posted July 5, 2009 Have you tried removing the comment tag? --> This symbol: #from this line? # $vars["ClientID"] So that it looks like this: $vars["ClientID"] i've done that but no luck. here is How i did it. just go to the template directory you are using, open logout.tpl change the link address after {$LANG.logoutsuccessful <a href.... to the url you want to redirect customer, optional is a auto redirect after 2 seconds <meta http-equiv="refresh" content="2;URL=http://yourdomain.com" /> sample code of logout.tpl <p>{$LANG.logoutsuccessful} <a href="http://yourdomain.com">{$LANG.logoutcontinuetext}</a></p> <meta http-equiv="refresh" content="2;URL=http://yourdomain.com" /> 0 Quote Link to comment Share on other sites More sharing options...
InteraNetworks Posted August 8, 2009 Share Posted August 8, 2009 I copied my homepage.tpl code to logout.tpl with the logout message at the top of the homepage. 0 Quote Link to comment Share on other sites More sharing options...
dan76 Posted October 17, 2009 Share Posted October 17, 2009 No i haven't tried.. but would removing # redirect to my domina's home page? I just saved the following code in a php file and uploaded it to the includes/hooks directory. <?php function logout_redirect($vars) { header( 'Location: http://www.YOUR-SITE.com/' ) ; } add_hook("ClientLogout",1,"logout_redirect",""); ?> I'm not a programmer, so your comments are welcome if I did something wrong. 0 Quote Link to comment Share on other sites More sharing options...
herpherp Posted October 17, 2009 Share Posted October 17, 2009 I just saved the following code in a php file and uploaded it to the includes/hooks directory. I'm not a programmer, so your comments are welcome if I did something wrong. Not sure what the extra ,"" was for so removed that and changed the url to /index.php but works good either way... Hadn't got around to doing this but have been meaning to thanks for the assist and not making me think.... 0 Quote Link to comment Share on other sites More sharing options...
dan76 Posted October 18, 2009 Share Posted October 18, 2009 Not sure what the extra ,"" was for so removed that and changed the url to /index.php but works good either way... Hadn't got around to doing this but have been meaning to thanks for the assist and not making me think.... Yeah, I noticed the extra "" after my post. It still works, but I went back and deleted it because it wasn't needed. Thanks for the feedback. 0 Quote Link to comment Share on other sites More sharing options...
edwardtate Posted January 25, 2013 Share Posted January 25, 2013 I know this thread is old and outdated, but seeing as I came across it through a Google Search my input may still be useful. Take your logout.tpl file, delete all it's contents, and just add the following: {php} header('Location: /YourIndexFolder/'); {/php} Hope this helps some people; ~ Edward Tate. 0 Quote Link to comment Share on other sites More sharing options...
ioncode Posted July 22, 2013 Share Posted July 22, 2013 Edward, It took two pages to get here but I think you have given the best answer to the person. 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.