Skip to content

Instantly share code, notes, and snippets.

@gurkanoluc
Created January 7, 2011 19:52
Show Gist options
  • Save gurkanoluc/769997 to your computer and use it in GitHub Desktop.
Save gurkanoluc/769997 to your computer and use it in GitHub Desktop.
<?php
class Main extends MY_Controller {
function __construct() {
parent::__construct();
}
function index()
{
$session = $this->facebook_client->getSession();
if(!$session)
{
echo $this->facebook_client->redirect();
return;
}
$user = $this->User_model->findUserByFbUid($session['uid']);
if(!$user)
{
redirect('/user/callback');
}
else
{
$this->beLoggedIn($user->id);
redirect('main/dashboard');
}
}
public function dashboard()
{
$this->render('main/dashboard');
}
}
/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment