Will Hosting Posted July 25, 2010 Share Posted July 25, 2010 Hello, I was wondering if there is any way to check whether a client is logged in on my homepage. I have the WHMCS portal/panel integrated already and I want to show a log in box on my homepage. I want it so that if they are not signed in, a login form appears (already have the code for that) and if they are signed in, then it shows the following: Welcome Back, [first name]! [Link to portal] [sign out link] I was also wondering if it was possible to show an admin page link if the user is an admin. Any suggestions about how to show different text if they are signed in or if they are signed out? The current portal is at http://portal.willhosting.com/ and the website is at http://willhosting.com (though, we are working on a beta one, too) If anyone could help, it would be greatly appreciated by Will Hosting and by our clients. 0 Quote Link to comment Share on other sites More sharing options...
Milliment Posted July 25, 2010 Share Posted July 25, 2010 there is a session veriable or name but i am not sure what it is myself. Maybe if you Email WHMCS they could provide the information 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted July 25, 2010 Share Posted July 25, 2010 Code to check if user is logged in or not {if !$loggedin } Show text A and login form {else} Show text B {/if} Code for Welcome message {if $loggedin} Welcome <strong>{$loggedinuser.firstname}</strong>, {else} <a href="clientarea.php" title="{$LANG.loginbutton}"><strong> {$LANG.loginbutton}</strong></a> {/if} I hope this will help you Best of luck! 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted July 25, 2010 Share Posted July 25, 2010 It would be amazing if this could work on a non WHMCS page. I tried to find a way to make it work a few months ago but couldn't figure it out 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted July 25, 2010 Share Posted July 25, 2010 Yes it only work on WHMCS page. But for what purpose you want to use it on non WHMCS page? 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted July 25, 2010 Share Posted July 25, 2010 On my site I use a plain XHTML/CSS design for the main site and then WHMCS for the billing/support. I try to make my website and WHMCS flow together without noticing but the problem with that is that I can't really use scripts that only work on WHMCS because it will disappear on other pages. Jack 0 Quote Link to comment Share on other sites More sharing options...
Milliment Posted July 27, 2010 Share Posted July 27, 2010 well in all fairness i have WHMCS in one folder and my website in the public So passing the session over to the main website is needed to make for a seemless intergration. Now in all fairness i know i have had a email somewhere with veriables in it so i will have a look and get back to you. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted October 20, 2010 Share Posted October 20, 2010 well in all fairness i have WHMCS in one folder and my website in the public So passing the session over to the main website is needed to make for a seemless intergration. Now in all fairness i know i have had a email somewhere with veriables in it so i will have a look and get back to you. Thanks mate. I'd love to hear how it goes for you. Jack 0 Quote Link to comment Share on other sites More sharing options...
WebsiteIntegrations Posted October 20, 2010 Share Posted October 20, 2010 haven't tested any of them but there are some suggestions in this post http://forum.whmcs.com/showthread.php?t=12042 0 Quote Link to comment Share on other sites More sharing options...
weblantis Posted October 26, 2010 Share Posted October 26, 2010 This is the solution I came up with and it works fine. http://forum.whmcs.com/showthread.php?t=32936 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.