Jump to content

how to add logged in client name to non-WHMCS page


bstellar

Recommended Posts

How do I access the session variable user id to determine if the client is logged in?

And then, how do I access the database class that will get me the client name for the user id that is logged in?

There have been several people asking this question and no one answering it, except one guy that gave a solution in 2011  that appears to be obsolete now (there is no file called dbconnect.php)

This is for a non-WHMCS page. Not a page in the WHMCS sub folders

Link to comment
Share on other sites

Hi,

 

In latest version of WHMCS, WHMCS has removed the dpconnect.php file. Now, in WHMCS you can find the file name with "init.php". Please use this file instead of dbconnect.php.

 

And one thing mysql is deprecated in latest WHMCS. So, you have to use Capsule queries for that.

 

For Capsule queries , follow this link: https://developers.whmcs.com/advanced/db-interaction/

Link to comment
Share on other sites

2 hours ago, bstellar said:

WGS,

Thank you so much! I have been struggling with this for 2 months. It's not easy trying to integrate with encrypted files.

I will try again with the info you gave.

Thank you.

Sure, The above information should be work for you. Just try it!

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