application/controllers/Dashboard.php
/**
     * Method to check if user is logged in or not.
     * 
     * @return void
     */
Method to check if user is logged in or not.

@return void
Method to check if user is logged in or not . @return void
private function _isLoggedIn()
    {
        if (!$this->session->userdata('authenticated')) {
            $this->session->set_flashdata('message', 'You are <strong>not logged in</strong>!');
            $this->session->set_flashdata('className', 'alert-danger');
            redirect('users/login');
        }
    }
private function _isLoggedIn ( ) { if ( ! $ this -> session -> userdata ( 'authenticated' ) ) { $ this -> session -> set_flashdata ( 'message' , 'You are <strong>not logged in</strong>!' ) ; $ this -> session -> set_flashdata ( 'className' , 'alert-danger' ) ; redirect ( 'users/login' ) ; } }
Method to check if user is logged in or not.
Method to check if user is logged in or not .