Ejemplo n.º 1
0
<?php

include_once 'app/bootstrap.php';
use App\Handlers\MustacheHandler;
use App\Handlers\TwitterHandler;
use App\Utils\URL;
if (!TwitterHandler::i()->hasLoggedIn()) {
    URL::redirect('/login');
}
$sContent = MustacheHandler::i()->render('home/index', ['bLoggedIn' => TwitterHandler::i()->hasLoggedIn()]);
MustacheHandler::i()->show('build', ['content' => $sContent]);
Ejemplo n.º 2
0
 /**
  * End the api session.
  *
  * @param   string  $sUrlRedirect where the page would redirect after ending the session
  * @return  void
  */
 public function endSession($sUrlRedirect = '/')
 {
     AppSessionHandler::i()->remove('oauth_token');
     AppSessionHandler::i()->remove('oauth_token_secret');
     AppSessionHandler::i()->remove('oauth_verifier');
     AppSessionHandler::i()->remove('access_token');
     URL::redirect($sUrlRedirect);
 }
Ejemplo n.º 3
0
<?php

include_once '../app/bootstrap.php';
use App\Handlers\MustacheHandler;
use App\Handlers\TwitterHandler;
use App\Utils\URL;
if (TwitterHandler::i()->hasLoggedIn()) {
    URL::redirect('/');
}
$sContent = MustacheHandler::i()->render('login/index');
MustacheHandler::i()->show('build', ['content' => $sContent]);