Browse Source

Sessions is now autoloaded

master
Rogier Neeleman 9 years ago
parent
commit
8484e965e6
  1. 2
      application/config/autoload.php
  2. 1
      application/controllers/Beoordelen.php
  3. 1
      application/controllers/Dashboard.php
  4. 1
      application/controllers/Login.php
  5. 1
      application/controllers/Logout.php

2
application/config/autoload.php

@ -58,7 +58,7 @@ $autoload['packages'] = array();
| |
| $autoload['libraries'] = array('user_agent' => 'ua'); | $autoload['libraries'] = array('user_agent' => 'ua');
*/ */
$autoload['libraries'] = array('form_validation', 'database'); $autoload['libraries'] = array('form_validation', 'database', 'session');
/* /*
| ------------------------------------------------------------------- | -------------------------------------------------------------------

1
application/controllers/Beoordelen.php

@ -10,7 +10,6 @@ class Beoordelen extends CI_Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->load->library('session');
if(! $this->session->userdata('validated')){ if(! $this->session->userdata('validated')){
redirect(base_url('/login')); redirect(base_url('/login'));
} }

1
application/controllers/Dashboard.php

@ -10,7 +10,6 @@ class Dashboard extends CI_Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->load->library('session');
if(! $this->session->userdata('validated')){ if(! $this->session->userdata('validated')){
redirect(base_url('/login')); redirect(base_url('/login'));
} }

1
application/controllers/Login.php

@ -10,7 +10,6 @@ class Login extends CI_Controller
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->load->library('session');
} }
public function index() public function index()

1
application/controllers/Logout.php

@ -14,7 +14,6 @@ class Logout extends CI_Controller
public function index() public function index()
{ {
$this->load->library('session');
$this->session->sess_destroy(); $this->session->sess_destroy();
redirect(base_url('/')); redirect(base_url('/'));

Loading…
Cancel
Save