[eluser]kevinh21[/eluser]
Hi everyone,
Following situation:
I have 2 controllers: blog and user(it's the redux authentification library/controller).
I have the following layout that is built in the blog controller:
----------------
|--|--------|--|
|--|-content|--|
|--|--------|--|
----------------
In the right navigation i have the usercontrol panel (login/logout link and things like this).
The logout link refers to the "user/logout" function listed here:
Code:
function logout ()
{
$this->redux_auth->logout(); // Destroy the session variables.
redirect('');
}
With the redirect command it will show me the mainpage (controller: blog/index())
even if i was in the blog/viewpost action before.
What i want:
If i'm looking a blogpost and click the logout link on the right side, it should log me out (user/logout()) but then it should redirect me to the page i was before -> viewing a post in this situation (blog/viewpost())
How is this possible?