public function execute($filterChain) { $response = $this->getContext()->getResponse(); if ($this->isFirstCall() && strcmp($this->getContext()->getModuleName(), sfConfig::get('sf_error_404_module')) != 0) { MixiAppMobileApi::initWithConsumer('72c8baa2729242c60971', '34567026c9d9b70550be5aa4b3648b21765bc6f9'); if (!$this->memberExist()) { if (!$this->memberRegister()) { header("Location:" . sfConfig::get('sf_mixi_index_url') . "error/"); exit; //return $this->getContext()->getController()->forward('error', 'index'); } } $mixi = new MixiAppMobileApi(); $person = $mixi->get(sfConfig::get('sf_opensocial_person_api')); $this->getContext()->getRequest()->setAttribute("person", $person); } $filterChain->execute(); }