/** 
  * Actions to be done after a sign up process
  * 
  * @param \SLUB\Vk2\Domain\Model\User $user
  * @param bool $login Login after creation
  * @return void
  */
 public function afterSignupDo(\SLUB\Vk2\Domain\Model\User $user, $login = TRUE)
 {
     // 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);
     }
     // redirect
     $this->redirect('show', 'Main', NULL);
 }
Exemple #2
0
 /**
  * Gets the user by his userid
  * @param \SLUB\Vk2\Domain\Repository\UserRepository $repo
  * @param string $username
  * @return \SLUB\Vk2\Domain\Model\User $user
  */
 public static function getUserByUsername($repo, $username)
 {
     $feUserObj = $repo->findByUsername($username);
     return $feUserObj;
 }