function editUser( $user, $update ) {
global $_CB_framework, $_PLUGINS, $ueConfig;
$oldUserComplete = new \CB\Database\Table\UserTable();
...snip...
$_PLUGINS->trigger( 'onBeforeUserUpdate', array( &$user, &$user, &$oldUserComplete, &$oldUserComplete ) );
if ( ! $user->store() ) {
return false;
}
$_PLUGINS->trigger( 'onAfterUserUpdate', array( &$user, &$user, $oldUserComplete ) );
return true;
}
Please Log in to join the conversation.
Please Log in to join the conversation.
function registerUser( $newuser ) {
global $_CB_framework, $_PLUGINS, $ueConfig;
$user = new \CB\Database\Table\UserTable();
foreach($newuser as $key=>$value) {
$user->set( $key, $value);
}
$user->store();
}
function editUser( $user, $update ) {
global $_CB_framework, $_PLUGINS, $ueConfig;
$oldUserComplete = new \CB\Database\Table\UserTable();
foreach($update as $key=>$value) {
$user->set( $key, $value);
}
$user->store();
}
define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR );
define( 'JPATH_BASE', '/home/metro/public_html' );
require_once( JPATH_BASE . DS . 'configuration.php');
global $_CB_framework, $mainframe;
require_once( JPATH_BASE . DS . 'includes' . DS . 'defines.php' );
require_once( JPATH_BASE . DS . 'includes' . DS . 'framework.php' );
require_once( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'factory.php' );
/*****************************************************************
Create the Application */
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();
jimport('joomla.plugin.helper');
$user = JFactory::getUser();
/*****************************************************************
Load Community Builder */
include_once( JPATH_BASE . DS . 'administrator/components/com_comprofiler/plugin.foundation.php' );
cbimport( 'cb.database' );
$myId = $_CB_framework->myId();
$user =& CBuser::getUserDataInstance( $myId );
Please Log in to join the conversation.
$user->storeDatabaseValues( array( 'FIELD_NAME_1' => 'VALUE', 'FIELD_NAME_2' => 'VALUE' ) );
$user->storeDatabaseValue( 'FIELD_NAME', 'VALUE' );
global $_PLUGINS;
$_PLUGINS->loadPluginGroup( 'user' );
Please Log in to join the conversation.
Please Log in to join the conversation.
$_PLUGINS->loadPluginGroup( 'user' );
Please Log in to join the conversation.