[TYPO3-mvc] update an existing fe_user without editAction

Kevin Ulrich Moschallski km at 3digit.de
Mon May 24 14:53:53 CEST 2010


Hi Sebastian,

thanks for your help, it works fine. I knew there must have been something like this in extbase :)

Here is what i did, if somebody needs the same:

$propertyMapper = t3lib_div::makeInstance('Tx_Extbase_Property_Mapper');
$propertyMapper->injectReflectionService(new Tx_Extbase_Reflection_Service);
$propertyNamesToMap = array('employeeid', 'salutation', 'title', 'firstname', 'specification', 'moreinformation', 'agreelegal');
$propertyMapper->map($propertyNamesToMap, $newUser, $existingUser);
$this->userRepository->update($existingUser);

Regards,

Kevin Moschallski

Am 23.05.2010 um 09:44 schrieb Sebastian Kurfürst:

> Hey,
> 
> I think I'd call the Extbase property mapper:
> 
> $propertyMapper = t3lib_div::makeInstance('Tx_Extbase_Property_Mapper');
> $propertyNamesToMap = array('firstname', 'lastname', ...);
> $propertyMapper->map($propertyNamesToMap, $newUser, $existingUser);
> 
> Greets,
> Sebastian
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list