2006-02-17, 04:22 PM
Why is class_SDK.php no longer distributed with MyBB? Is it not being supported/updated anymore?
Also wondering if anyone has any ideas how I can check if a user is logged in using the SDK. I currently check for the cookie:
I've tried add a function to the SDK:
Also wondering if anyone has any ideas how I can check if a user is logged in using the SDK. I currently check for the cookie:
if($_COOKIE['mybbuser'])
{
unset($user);
global $userUID;
$logon = explode("_", $_COOKIE['mybbuser'], 2);
$userUID = $logon[0];
//echo "<br><br><b>User: ".$userUID."<br><br>";
$user = $mybbSDK->getProfile($userUID);
}
but it seems that it isnt always reliable.I've tried add a function to the SDK:
function checkLogin()
{
if($this->$mybb->user['uid'] != 0)
{
return "Welcome back!";
}
else
{
return "Hello there visitor!";
}
But that didnt work. It always reutned guess. Anyone have any other ideas how I can do it?