Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter

[eluser]Unknown[/eluser]
Hello, I'm trying to use Flexi Auth in my project and I just faced the following problem: when I'm running code
Code:
function __construct() {
      parent::__construct();
      $this->auth = new stdClass;
    $this->load->library('flexi_auth');
                $this->load->model('flexi_auth_model');
    }

public function index(){
     $is=$this->flexi_auth->is_privileged('dashboard');
     echo $this->db->last_query();
}

$is is always false, but

Code:
$gg=$this->flexi_auth->get_user_privileges()->result();
print_r($gg);

shows

Code:
Array
(
    [0] => stdClass Object
        (
            [upriv_id] => 1
            [upriv_name] => dashboard
            [upriv_desc] => Dashboard access
            [upriv_users_id] => 1
            [upriv_users_uacc_fk] => 1
            [upriv_users_upriv_fk] => 1
        )

    [1] => stdClass Object
        (
            [upriv_id] => 2
            [upriv_name] => dsfsdf
            [upriv_desc] => Dsfsdf access
            [upriv_users_id] => 2
            [upriv_users_uacc_fk] => 1
            [upriv_users_upriv_fk] => 2
        )

)

Where am i wrong at using is_privileged?


Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 01-04-2014, 01:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB