To get cb field values for the current user you must do a query search on the comprofiler table in one of your plugin functions.
So you can create a function in your plugin class called myplug_GetUserConfig() as follows:
[code:1]
function myplug_GetUserConfig($id) {
global $database;
$database->setQuery("select cb_field1, cb_field2, cb_field3 from #__comprofiler WHERE id=".$id);
$userConfig=$database->loadObjectList();
return $userConfig[0];
}
[/code:1]
This function could then be called in your getDisplayTab() class function as follows:
[code:1]
function getDisplayTab($tab,$user,$ui) {
global $database, $mosConfig_live_site, $acl, $my, $mosConfig_offset, $ueConfig,$mainframe, $mosConfig_lang;
$this->_getLanguageFile();
//Get User Level Configuration Options
$userConfig = $this->myplug_GetUserConfig($user->id);
$cbfield1 = $userConfig->cb_field1;
$cbfield2 = $userConfig->cb_field2;
$cbfield3 = $userConfig->cb_field3;
}
[/code:1]
Hope this helps!
Post edited by: nant, at: 2006/02/03 09:18
Post edited by: nant, at: 2006/02/03 09:19