/** * Some additional actions after profile creation * * @param $user * @param $action * @param string $redirectByActionName Action to redirect * @param bool $login Login after creation * @param string $status * @return void */ public function finalCreate($user, $action, $redirectByActionName, $login = TRUE, $status = '') { // persist user (otherwise login is not possible if user is still disabled) $this->userRepository->update($user); $this->persistenceManager->persistAll(); // login user if ($login) { $this->loginAfterCreate($user); } // send notify email to admin if ($this->settings['new']['notifyAdmin']) { $this->div->sendEmail('createNotify', Div::makeEmailArray($this->settings['new']['notifyAdmin'], $this->settings['new']['email']['createAdminNotify']['receiver']['name']['value']), Div::makeEmailArray($user->getEmail(), $user->getUsername()), 'Profile creation', array('user' => $user, 'settings' => $this->settings), $this->config['new.']['email.']['createAdminNotify.']); } // sendpost: send values via POST to any target Div::sendPost($user, $this->config, $this->cObj); // store in database: store values in any wanted table Div::storeInDatabasePreflight($user, $this->config, $this->cObj, $this->objectManager); // add signal after user generation $this->signalSlotDispatcher->dispatch(__CLASS__, __FUNCTION__ . 'AfterPersist', array($user, $action, $this)); // frontend redirect (if activated via TypoScript) $this->redirectByAction($action, $status ? $status . 'Redirect' : 'redirect'); // go to an action $this->redirect($redirectByActionName); }