ria/application/controllers/error.php
gandhimathi Bharathirajan e2ec75f3f6 ALL
2017-11-16 18:34:33 +05:30

46 lines
961 B
PHP

<?php if(!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Class : Login (LoginController)
* Login class to control to authenticate user credentials and starts user's session.
* @author : Kishor Mali
* @version : 1.1
* @since : 15 November 2016
*/
class Error extends CI_Controller
{
/**
* This is default constructor of the class
*/
public function __construct()
{
parent::__construct();
}
/**
* Index Page for this controller.
*/
public function index()
{
$this->isLoggedIn();
}
/**
* This function used to check the user is logged in or not
*/
function isLoggedIn()
{
$isLoggedIn = $this->session->userdata('isLoggedIn');
if(!isset($isLoggedIn) || $isLoggedIn != TRUE)
{
$this->load->view('login');
}
else
{
redirect('pageNotFound');
}
}
}
?>