First usage has out dated API loader. You'll need to use the below to load in CB.
Code:
if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) ) {
return;
}
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
Next you need to load in some API to use. To reliably do this I recommend just calling the below.
Code:
cbimport( 'cb.html' );
Next for the viewing user object you'd call the below.
Code:
$cbUser = CBuser::getMyUserDataInstance();
All together it'd be as follows.
Code:
if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) ) {
return;
}
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
cbimport( 'cb.html' );
$user = CBuser::getMyUserDataInstance();
If CB API is already loaded you'll only need to call the CBuser usage.