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

[eluser]haseydesign[/eluser]
@janesjoplin

I would hazard a guess that there is some problem with your Codeigniter session setup.

The function get_user_privileges() is getting data from the database, and it is indicating that yes, the logged in user should have permission.
However the is_privileged() function is checking the logged in users current session data, if the privilege isn't defined within their session, then that will be your problem.

Once your user has logged in, try returning the session data to see what their credentials are.
Code:
echo '<pre>';
print_r($this->session->userdata['flexi_auth']);
echo '</pre>';

Array
(
    [user_identifier] => [email protected]
    [user_id] => 1
    [admin] => 1
    [group] => Array
        (
            [3] => Master
        )

    [privileges] => Array
        (
            [1] => dashboard
        )

    [logged_in_via_password] => 1
    [login_session_token] => b4562131fb41629a287ecd99750c40838c99e416
)


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



Theme © iAndrew 2016 - Forum software by © MyBB