My custom implementation is happening in frontend. The form allows a privileged user to modify the data of another user.
I tried to add $_PLUGINS->loadPluginGroup( 'user' ); as suggested. The user data are correctly saved but CB Profile Update Logger does not register the log of the modify
This is my code:
protected function CBeditUser( $user_id, $customer ) {
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
include_once( JPATH_ROOT . '/libraries/CBLib/CB/Legacy/LegacyComprofilerFunctions.php' );
cbimport( 'cb.html' );
global $_CB_framework, $_PLUGINS, $ueConfig;
$_PLUGINS->loadPluginGroup( 'user' );
.....some code....
foreach($customer as $key => $data){
$user->set( $key, $customer[$key] );
}
$user->set( 'name', trim( $customer . ' ' . $customer ) );
$_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$user, &$user, &$oldUserComplete, &$oldUserComplete ) );
if ( ! $user->store() ) {
return false;
}
$_PLUGINS->trigger( 'onAfterUserUpdate', array( &$user, &$user, $oldUserComplete ) );
}
Where am I wrong?