Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]JonoB[/eluser]
in the example controller, there is a function change_password.

If the action is successful, then some flashdata is set, and the logout function is called.

Code:
if ($change)
{ //if the password was successfully changed
    $this->session->set_flashdata('message', $this->ion_auth->messages());
    $this->logout();
}

Code:
function logout()
{
    $this->data['title'] = "Logout";

    //log the user out
    $logout = $this->ion_auth->logout();

    //redirect them back to the page they came from
    redirect('auth', 'refresh');
}

$this->ion_auth->logout(), amongst other things calls

Code:
$this->ci->session->sess_destroy();

This means, that once the redirect in the auth/logout function happens, the flashdata will be lost.

Is there any point in setting flash data in auth/change_password?


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 05-31-2011, 11:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB