Ahaaa, I found some code on the forum
Establishing the user object:
Code:
<?php
global $_CB_framework, $mainframe;
if ( defined( 'JPATH_ADMINISTRATOR' ) ) {
if ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB not installed!';
return;
}
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
} else {
if ( ! file_exists( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' ) ) {
echo 'CB not installed!';
return;
}
include_once( $mainframe->getCfg( 'absolute_path' ) . '/administrator/components/com_comprofiler/plugin.foundation.php' );
}
$user =& CBuser::getUserDataInstance( $_CB_framework->myId() );
Is that still correct code?
Then to get a field would be something like
Is that correct?
Oh, and it's in a component of course I need to check this, but it's going to display one module or another.