Jump to content

  • twitter
  • youtube
  • googleplus
  • facebook
  • rss
  • newsletter


Tutorial info Visit support topic

  • Added on: Jan 08 2009 06:17 PM
  • Views: 2298
 


[IPBSDK] Function: is_loggedin

One of the most simplest yet most needed IPBSDK functions

Posted by Michael on Jan 08 2009 06:17 PM
One of the most simplest yet most needed IPBSDK functions, basically determines if the visitor is a guest or a member, you'll use this function a lot in member bars, member only pages, guest messages etc.. First off you'll need a php file with the <?php ?> tags setup.

First thing that is required at least once in the page is to require the sdk class.

require_once "sdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

Now you'll need to use php if and else using the function $SDK->is_loggedin()

if($SDK->is_loggedin())
{
	echo 'You are logged in!';
}
else
{
	echo 'You are not logged in!';  
}

Your whole page should look something like this

<?php

require_once "sdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();

if($SDK->is_loggedin())
{
	echo 'You are logged in!';
}
else
{
	echo 'You are not logged in!';
}

?>

Powered by Tutorials 1.4.1 © 2012, by Michael McCune