Ejemplo n.º 1
0
 public function call(\Raptor\Raptor $app)
 {
     $conf = $app->getConfigurationLoader()->getConfOption();
     $this->app = $app;
     if (isset($conf['raptor']['admin']) and isset($conf['raptor']['adminpass'])) {
         if (!$app->getSession()->get('admin_auth')) {
             $this->handleAuthenticationRequest($message, $conf);
             $app->response()->write($app->render('@systemBundle/Login/index.html.twig', array('error' => $message, 'username' => $this->app->request()->post('username'))));
             $app->contentType('text/html; charset=UTF-8');
             return true;
         }
     }
     return false;
 }