public function init()
 {
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $loginController->checkStatus();
     $this->post = Request::post();
     $this->session = new Session();
 }
Exemplo n.º 2
0
 public function init()
 {
     $this->get = Request::get();
     $this->session = new Session();
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $this->isLoggedIn = $loginController->checkStatus();
     Phalanx::loadClasses('Posts', 'Notification');
 }
 public function init()
 {
     $this->session = new Session();
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $loginController->checkStatus();
     $this->post = Request::post();
     $this->files = Request::files();
     $this->get = Request::get();
     $this->views = new Views(new Template("default"));
 }
Exemplo n.º 4
0
 public function logout()
 {
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $loginController->checkStatus();
     if ($this->session->accept_token != REQUEST_TOKEN) {
         Request::redirect(HOST . 'login');
     }
     SocialNetwork::unlink_account($this->session->user->id, SocialNetwork::FACEBOOK);
     Request::redirect(HOST . 'perfil/configuracoes');
 }
Exemplo n.º 5
0
 public function init()
 {
     $this->post = Request::post();
     $this->session = new Session();
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $loginController->checkStatus();
     #Goodbye, XSS
     if ($this->session->accept_token != REQUEST_TOKEN) {
         Request::redirect(HOST . 'login');
         return;
     }
 }
Exemplo n.º 6
0
 public function init()
 {
     $this->session = new Session();
     if (!in_array(URI, array('/perfil/configuracoes/reativar-conta', 'perfil/configuracoes/reativar-conta'))) {
         Phalanx::loadController('LoginController');
         $loginController = new LoginController();
         $loginController->checkStatus();
     }
     $this->post = Request::post();
     $this->files = Request::files();
     $this->get = Request::get();
     $this->views = new Views(new Template("default"));
 }
Exemplo n.º 7
0
 public function init()
 {
     $this->post = Request::post();
     $this->session = new Session();
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $loginController->checkStatus();
     Phalanx::loadClasses('Friendship', 'Timeline', 'Notification', 'Message');
     #Goodbye, XSS
     if ($this->session->accept_token != REQUEST_TOKEN) {
         Request::redirect(HOST . 'login');
         return;
     }
 }
Exemplo n.º 8
0
 public function init()
 {
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $loginController->checkStatus();
     $this->session = new Session();
     #Goodbye, XSS
     if ($this->session->accept_token != REQUEST_TOKEN) {
         Request::redirect(HOST . 'login');
         return;
     }
     Phalanx::loadClasses('Instagram');
     $this->config = array('client_id' => INSTAGRAM_CLIENT_ID, 'client_secret' => INSTAGRAM_CLIENT_SECRET, 'grant_type' => INSTAGRAM_GRANT_TYPE, 'redirect_uri' => HOST . INSTAGRAM_REDIRECT_URI);
 }
Exemplo n.º 9
0
 public function init()
 {
     Phalanx::loadClasses('Notification');
     $this->get = Request::get();
     $this->post = Request::post(true, REPLACE);
     $this->session = new Session();
     $template = new Template("default");
     Phalanx::loadController('LoginController');
     $loginController = new LoginController();
     $this->isLoggedIn = $loginController->checkStatus();
     if (!$this->isLoggedIn) {
         $template->show_login_bar = true;
     }
     $this->views = new Views($template);
 }