Jump to content

Get $_SESSION['uid'] outside from WHMCS


andreic

Recommended Posts

Hello,

 

I tried to find a solution how to use $_SESSION['uid'] outside of WHMCS. I wanted to make a login form in wordpress, but I can't use the session to check if the user is logged in or not.

 

I tried to use this in a file created inside of whmcs directory and to included in header of wordpress:

<?php
require("dbconnect.php");

if ($_SESSION['uid']) {
echo "whmcs user logged in";
} else {
echo "whmcs user not yet login";
}
?>

 

But it's not working. If I put require dbconnect.php, it's appearing Down for Maintenance (Err 2)

An upgrade is currently in progress... Please come back soon...

 

Can someone help me, please?

 

Thank you,

Andrei

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