Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]Random dude[/eluser]
Ben can you or another grand master please critique this library (which is auto-loaded in autoload.php) and tell me if this code will actually work and not leave my cms open to the world?

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Check_logged_in {

    public function __construct()
    {
        $CI =& get_instance();
        $CI->load->library('ion_auth');
        $CI->load->helper('url');
        
        if (!$CI->ion_auth->logged_in())
        {
            redirect( base_url() . "index.php/auth/login");
        }
    }
}
?>

Cheers.


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 04-17-2011, 10:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB