php - how can is delete all session information? -


i'm getting ready upgrade website, , in new update, there need new session variable user_level. i'm wondering if there anyway server side can end sessions without having code anything. if not, intention test whether or not variable set, , if isn't destroy session forcing user relog. this..

if(!$this->session->userdata['user_level'])  {      $this->session->sess_destroy();  } 

userdata function not array read session docs

try this,

if(!$this->session->userdata('user_level'))  {     $this->session->userdata = array();     $this->session->sess_destroy(); } 

if want unset single session variable use like,

$this->session->unset_userdata('user_level');// remove user_level session 

read http://ellislab.com/forums/viewthread/195025/


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -