Beispiel #1
0
 /**
  * @param User             $user
  * @param SessionInterface $session
  *
  * @return boolean
  */
 private function isForceEnabled(User $user, SessionInterface $session)
 {
     if (in_array($user->getUsername(), $this->container->getParameter('force_enable'))) {
         return true;
     }
     if (null === ($betaKey = $session->get('beta_key'))) {
         return false;
     }
     $em = $this->getDoctrine()->getManager();
     $repo = $em->getRepository('Model:BetaSignup');
     return null !== $repo->findByBetaKey($betaKey);
 }
Beispiel #2
0
 public function message(OutputInterface $output, User $user, $message)
 {
     $output->writeln(sprintf('<info>[%s]</info> %s', $user->getUsername(), $message));
 }