/** * Status update confirmation * * @param User $user * @return void */ protected function statusConfirm(User $user) { $values = GeneralUtility::xml2array($user->getTxFemanagerChangerequest()); foreach ((array) $values as $field => $value) { if ($field !== 'usergroup' && method_exists($user, 'set' . ucfirst($field))) { $user->{'set' . ucfirst($field)}($value['new']); } else { $user->removeAllUsergroups(); $usergroupUids = GeneralUtility::trimExplode(',', $value['new'], true); foreach ($usergroupUids as $usergroupUid) { /** @var UserGroup $usergroup */ $usergroup = $this->userGroupRepository->findByUid($usergroupUid); $user->addUsergroup($usergroup); } } } $user = FrontendUtility::forceValues($user, $this->config['edit.']['forceValues.']['onAdminConfirmation.']); LogUtility::log(Log::STATUS_PROFILEUPDATECONFIRMEDADMIN, $user); $this->addFlashMessage(LocalizationUtility::translate('updateProfile')); }