• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fail to set flashdata after destroy session on logout


this is my code:
PHP Code:
    public function logout()
        $adminModel = new AdminModel();
        $category 'last_logout';
        $merchant $this->session->get('merchant');
        $action $merchant->email ' has logged out!';

        $this->session->setFlashdata('success''You have successfully logged out!');
        return redirect()->to('/merchant/login');

so, notice that i setFlashdata after session destroy.
it's not triggering the flashdata when redirected to login page.

was that intentional or was that a bug?

just found solution, just use $this->session->remove('merchant');

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.