inital commit
[pharext/pharext.org] / app / Controller / Github / Signin.php
1 <?php
2
3 namespace app\Controller\Github;
4
5 use app\Controller\Github;
6
7 class Signin extends Github
8 {
9 function __invoke(array $args = null) {
10 $callback = $this->app->getBaseUrl()->mod("./github/callback");
11 $location = $this->github->getAuthUrl($callback);
12 $this->app->redirect($location);
13 if ($returnto = $this->app->getRequest()->getQuery("returnto")) {
14 $this->session->returnto = $returnto;
15 }
16 }
17 }