mardi 26 janvier 2016

create whmcs 6 feed to check if client is logged in

I'am trying to check if a user is logged and display the first name from outside whmcs folder. I'am using feeds. I have created checkifloggedin.php in the feeds folder.

<?php
require("../init.php");    
if (isset($_SESSION['uid'])) {

    /*i can get the the id of the user but i cannot display the first
      name of the logged in user. tried several methods but i cannot
      make it work.*/

    widgetoutput();
    }
else {
    widgetoutput('logged out');
}

function widgetoutput($value) {
    echo "document.write('".addslashes($value)."');";
    exit;
}

?>

any help from you guys would be so appreciated.

Thanks a lot.




Aucun commentaire:

Enregistrer un commentaire