bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
36.3.1
by Daniel Hermansson
Added login functionality |
1 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
2 |
||
3 |
//Home controller
|
|
4 |
class Home extends CI_Controller { |
|
5 |
/*
|
|
6 |
* Constructor
|
|
7 |
*/
|
|
8 |
function __construct() { |
|
9 |
parent::__construct(); |
|
10 |
$this->load->model('user', '', TRUE); |
|
11 |
}
|
|
12 |
||
13 |
||
14 |
/*
|
|
15 |
* This function runs when the user navigates directly to the home controller
|
|
16 |
*/
|
|
17 |
function index() { |
|
18 |
//If the user is logged in
|
|
19 |
if($this->user->isLoggedIn()) |
|
20 |
{
|
|
90.1.8
by a11emmjo
Fixed some redirect-links. |
21 |
redirect(base_url().'cms', 'refresh'); |
36.3.1
by Daniel Hermansson
Added login functionality |
22 |
} else { |
23 |
//Redirect user to login page
|
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
24 |
redirect(base_url().'start', 'refresh'); |
36.3.1
by Daniel Hermansson
Added login functionality |
25 |
}
|
26 |
}
|
|
27 |
}
|
|
28 |
?>
|