Example #1
0
 /**
  * Init for User creation
  *
  * @return void
  */
 public function initializeUpdateAction()
 {
     $user = UserUtility::getCurrentUser();
     $userValues = $this->request->getArgument('user');
     $this->testSpoof($user, $userValues['__identity']);
     if ((int) $this->pluginVariables['user']['usergroup'][0]['__identity'] === 0) {
         unset($this->pluginVariables['user']['usergroup']);
     }
     if ($this->keepPassword()) {
         unset($this->pluginVariables['user']['password']);
         unset($this->pluginVariables['password_repeat']);
     }
     $this->request->setArguments($this->pluginVariables);
 }
Example #2
0
 /**
  * Init
  *
  * @return void
  */
 public function initializeAction()
 {
     $this->databaseConnection = $GLOBALS['TYPO3_DB'];
     $this->controllerContext = $this->buildControllerContext();
     $this->user = UserUtility::getCurrentUser();
     $this->contentObject = $this->configurationManager->getContentObject();
     $this->pluginVariables = $this->request->getArguments();
     $this->allConfig = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $this->config = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
     $this->config = $this->config['plugin.']['tx_femanager.']['settings.'];
     $controllerName = strtolower($this->controllerContext->getRequest()->getControllerName());
     $removeFromUserGroupSelection = $this->settings[$controllerName]['misc']['removeFromUserGroupSelection'];
     $this->allUserGroups = $this->userGroupRepository->findAllForFrontendSelection($removeFromUserGroupSelection);
     if (isset($this->arguments['user'])) {
         $this->arguments['user']->getPropertyMappingConfiguration()->forProperty('dateOfBirth')->setTypeConverterOption('TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter', DateTimeConverter::CONFIGURATION_DATE_FORMAT, LocalizationUtility::translate('tx_femanager_domain_model_user.dateFormat'));
     }
     // check if ts is included
     if ($this->settings['_TypoScriptIncluded'] !== '1' && !GeneralUtility::_GP('eID') && TYPO3_MODE !== 'BE') {
         $this->addFlashMessage(LocalizationUtility::translate('error_no_typoscript'), '', FlashMessage::ERROR);
     }
     // check if storage pid was set
     if ((int) $this->allConfig['persistence']['storagePid'] === 0 && !GeneralUtility::_GP('eID') && TYPO3_MODE !== 'BE') {
         $this->addFlashMessage(LocalizationUtility::translate('error_no_storagepid'), '', FlashMessage::ERROR);
     }
 }