Welcome Guest, Not a member yet? Register   Sign In
User Auth with Private Function
#5

[eluser]johnmchilton[/eluser]
EDIT: I fixed my problem. Just in case anyone wants to see what I did, here you go! :-)
Code:
<?php

function siteSetup() {
    
    $ci =& get_instance();
    
    $class = strtolower($ci->uri->router->class);
    $method = $ci->uri->router->method;
    
    $public_functions["admin"] = array("login","logout");

    
    if(!in_array($method,$public_functions[$class])) {
        
        if($ci->session->userdata($class . "_logged_in") != true) {
            
            redirect($class . "/login");
        }
    }
}
?>


Messages In This Thread
User Auth with Private Function - by El Forum - 07-01-2007, 06:07 PM
User Auth with Private Function - by El Forum - 07-02-2007, 04:57 AM
User Auth with Private Function - by El Forum - 07-02-2007, 05:28 AM
User Auth with Private Function - by El Forum - 07-02-2007, 09:58 AM
User Auth with Private Function - by El Forum - 07-05-2007, 11:33 PM
User Auth with Private Function - by El Forum - 07-09-2007, 05:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB