Author Topic

Clemens T

Saturday 01 October 2005 4:02:48 am

Comment44262

You've got to use the remote_id of a contentobject!

...
    $contentObject->setAttribute( 'remote_id', $oldid);    
	$contentObject->store();
...
//$remote_id = old user_id
function getNewUserID($remote_id){	
    $myTmpObject=eZPersistentObject::fetchObject( eZContentObject::definition(), null,
                                                        array( 'remote_id' => $remote_id) );
	if(is_object($myTmpObject))
    	return $myTmpObject->attribute('id');
    else 
    	return null;
}