- //Init reflection
- $reflection = new \ReflectionClass($this->config['class']['user']);
-
- //Create new user
- $user = $reflection->newInstance();
+ //With mail
+ if (!empty($_POST['register']['mail'])) {
+ //Log new user infos
+ $logger->emergency(
+ $this->translator->trans(
+ 'register: mail=%mail% locale=%locale% confirm=%confirm%',
+ [
+ '%mail%' => $postMail = $_POST['register']['mail'],
+ '%locale%' => $request->getLocale(),
+ '%confirm%' => $this->get('router')->generate(
+ $this->config['route']['confirm']['name'],
+ //Prepend subscribe context with tag
+ [
+ 'mail' => $postSmail = $slugger->short($postMail),
+ 'hash' => $slugger->hash($postSmail)
+ ]+$this->config['route']['confirm']['context'],
+ UrlGeneratorInterface::ABSOLUTE_URL
+ )
+ ]
+ )
+ );
+ }