Jeren Posted July 18, 2007 Share Posted July 18, 2007 Greetings. I'm looking to see how I can determine if a user is logged into WHMCS without being in WHMCS itself (ie: checking their login status from the main site). I tried a search on the forums for this but haven't found any help with this yet. How would I go about doing this? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted July 18, 2007 Share Posted July 18, 2007 I'm not sure how to do this, but why would you want to? I personally wouldn't want that information to be public on my site for all other users to see. 0 Quote Link to comment Share on other sites More sharing options...
Jeren Posted July 18, 2007 Author Share Posted July 18, 2007 I just want to check if a user is logged in to display one menu or another, based on if the person has already logged in. I don't intend for others to see who is logged in. 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted July 18, 2007 Share Posted July 18, 2007 Until someone else replies to this post, you could try checking if there is something like {if $logged.in} display some content</p> {/if} within the .tpl files 0 Quote Link to comment Share on other sites More sharing options...
quicklyweb Posted July 18, 2007 Share Posted July 18, 2007 There is example script in knowledge base to create your own pages with user autentication 0 Quote Link to comment Share on other sites More sharing options...
Jeren Posted July 18, 2007 Author Share Posted July 18, 2007 I'm assuming you mean this: http://support.whmcs.com/knowledgebase.php?action=displayarticle&catid=7&id=26 Would this require making the page with the WHMCS template I use? I'm just wanting to check if a user is logged in, so would I be able to just use <?php require("dbconnect.php"); require("includes/functions.php"); $pagetitle = $_LANG['clientareatitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav=''.$_LANG['globalsystemname'].''; require("init.php"); if ($_SESSION['loggedinstatus']=="true") { # User is Logged In - put any code you like here } ?> This should allow me to do something if they're logged in but not force me to use the template, right? 0 Quote Link to comment Share on other sites More sharing options...
quicklyweb Posted July 18, 2007 Share Posted July 18, 2007 I don't think so. So you should be able use that script with no problem. 0 Quote Link to comment Share on other sites More sharing options...
Jeren Posted July 18, 2007 Author Share Posted July 18, 2007 I'll give it a go, then! Thank you! 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.