• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the best practice to unset session variable in codeigniter?

#3
(08-22-2017, 01:26 PM)dave friend Wrote: Don't think an unqualified "best" can be determined.

If you look at the source code for unset_userdata you will see it calls unset($_SESSION['some_variable']);

The advantage to unset_userdata is that you can provide an array of sessions keys to be removed all at once without any further work on your part. In general I'll call unset on $_SESSION if a single item is being removed.

Thank you very much for your kind reply.
Reply


Messages In This Thread
RE: What is the best practice to unset session variable in codeigniter? - by curiousteam - 08-22-2017, 10:37 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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