public function createAction(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser $feUser) { //TODO prüfen ob username doppelt vergeben wird. if ($feUser->getPassword() == $this->request->getArgument('passwordConfirmation')) { $feUser->setPid($this->settings['pidFrontendUser']); $feUser->_setProperty('tx_extbase_type', 'Tx_Extbase_Domain_Model_FrontendUser'); $feUser->addUserGroup($this->frontendUserGroupRepository->findByUid($this->settings['frontendUserGroup'])); $this->frontendUserRepository->add($feUser); //it is not persistent already, we have to do it! $persistenceManager = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager'); $persistenceManager->persistAll(); //now feuser ist persistent // Message for User $GLOBALS['TSFE']->fe_user->setKey("ses", "feuserCreate", 'Der User <b>' . $feUser->getUsername() . '</b> wurde neu angelegt.'); $redirectParams['feUser'] = $feUser; $this->redirect('successUpdate', 'FrontendUser', NULL, $redirectParams); } else { $GLOBALS['TSFE']->fe_user->setKey("ses", "feuserCreate", 'Das Passwort stimmt nicht überein.'); $GLOBALS['TSFE']->fe_user->setKey("ses", "feuserData", array('username' => $feUser->getUsername())); $redirectParams['feUser'] = $feUser; $this->redirect('new', 'FrontendUser', NULL, array()); } }