Fixing Github sign-in

This commit is contained in:
Dan Cryer 2013-05-17 21:42:29 +01:00
parent 7b70fe3c69
commit b74a7070a7

View file

@ -175,8 +175,6 @@ class ProjectController extends b8\Controller
$github = \b8\Registry::getInstance()->get('github_app');
$code = $this->getParam('code', null);
$_SESSION['github_token'] = null;
if (!is_null($code)) {
$http = new \b8\HttpClient();
$url = 'https://github.com/login/oauth/access_token';
@ -190,6 +188,10 @@ class ProjectController extends b8\Controller
die;
}
}
if (!isset($_SESSION['github_token'])) {
$_SESSION['github_token'] = null;
}
}
/**