[eluser]noslen1[/eluser]
Hi everybody,
I've just registered on CI Forums to open up a new thread and share my problem with you.
I've created a basic authentication application based on cookie's session, for both admin users and client users in the Users table (Admin value set to 1 or 0 differentiate the status for each users).
When a user is logging in, I set a session containing user data, such as
name,
login... and
logged_in and
admin, then Users are redirected to 2 specific applications. if the
admin property in the session is set to 1, the admin is redirected to the
Backoffice application, else the client is redirected to
Espaceclient application.
This step works fine, my login function sees if
$this->session->userdata('admin') is true and then redirect the user with
redirect('backoffice').
But then, in the specific application, when I try to display the session, I can't find any of parameters i've stored, like
logged_in or
admin, and so my authentication is broken and can not go further.
Looks like the redirect function destroy sessions, so I don't know how to handle that issue.
Please let me know your thoughts about it.
I can paste some of my code if you need it.
Thanks !