Jump to content

[Custom Page] User Authentication Integration


Northern Host

Recommended Posts

I have my website built around WHMCS. The issue I'm running into is that even though the user is logged in, they must visit the client area first upon each new visit to the site in order to show they are authenticated, then everything is fine. Is it possible to change this, because I have it say "Welcome Back, User" at the top of my home page and they can't see it unless they are logged in.

 

This is the code I have at the top of my custom pages.

<?php 
require($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR."clients/init.php");
$whmcs = new WHMCS_ClientArea();

if ($whmcs->isLoggedIn()) {
$whmcs_result = mysql_query("SELECT * FROM tblclients WHERE id=".$whmcs->getUserID());
  	$whmcs_data = mysql_fetch_array($whmcs_result, MYSQL_ASSOC);
}
?>

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