Example #1
0
 public function run()
 {
     if ($_SESSION['token']) {
         header("Location: " . SITE_URL . "/dashboard");
         die;
     }
     if ($_POST) {
         $this->process_github($_POST['hub']);
     }
     $G = new Github();
     $this->state['featured'] = $G->get_featured_projects();
     $this->state['github_redirect'] = SITE_URL . '/auth';
     $this->_load("home.html");
 }