/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

	//Home controller
	class Logout extends CI_Controller {	
		/*
		 *	Constructor
		 */
		function __construct() {
			parent::__construct();
			
			//Load required library
			$this->load->model('user', '', TRUE);
		}
	
	
		/*
		 *	This function runs when the user navigates directly to the lougout controller
		 */
		public function index() {
			//Perform logout
			$this->user->logout();
			
			//Redirect user
			redirect(base_url().'home', 'refresh');
		}
	}
?>