src/Service/UserRegistrationService.php
protected function createRegistrationRecord(UserInterface $user)
    {
        $entityClass = $this->getOptions()->getRegistrationEntityClass();
        $entity = new $entityClass($user);
        $this->getEventManager()->trigger(__FUNCTION__, $this, array('user' => $user, 'record' => $entity));
        $entity->generateToken();
        $this->getUserRegistrationMapper()->insert($entity);
        $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this, array('user' => $user, 'record' => $entity));

        return $entity;
    }
protected function createRegistrationRecord(UserInterface $user)
    {
        $entityClass = $this->getOptions()->getRegistrationEntityClass();
        $entity = new $entityClass($user);
        $this->getEventManager()->trigger(__FUNCTION__, $this, array('user' => $user, 'record' => $entity));
        $entity->generateToken();
        $this->getUserRegistrationMapper()->insert($entity);
        $this->getEventManager()->trigger(__FUNCTION__ . '.post', $this, array('user' => $user, 'record' => $entity));

        return $entity;
    }
protected function createRegistrationRecord ( UserInterface $ user ) { $ entityClass = $ this -> getOptions ( ) -> getRegistrationEntityClass ( ) ; $ entity = new $ entityClass ( $ user ) ; $ this -> getEventManager ( ) -> trigger ( __FUNCTION__ , $ this , array ( 'user' => $ user , 'record' => $ entity ) ) ; $ entity -> generateToken ( ) ; $ this -> getUserRegistrationMapper ( ) -> insert ( $ entity ) ; $ this -> getEventManager ( ) -> trigger ( __FUNCTION__ . '.post' , $ this , array ( 'user' => $ user , 'record' => $ entity ) ) ; return $ entity ; }
Stored user registration record to database

@return UserInterface             $user
@return UserRegistrationInterface
Stored user registration record to database