method closeSession documentation in bbn\User

Closes the session in the database.

function($with_session = false) { if ($this->id) { if ($this->session) { $p = &$this->class_cfg['arch']['sessions']; $this->db->update( $this->class_cfg['tables']['sessions'], [ $p['ip_address'] => $this->ip_address, $p['user_agent'] => $this->user_agent, $p['opened'] => 0, $p['last_activity'] => date('Y-m-d H:i:s'), $p['cfg'] => json_encode($this->sess_cfg) ], [ $p['id_user'] => $this->id, $p['sess_id'] => $this->session->getId() ] ); if ($with_session) { $this->session->set([]); } else { $this->session->set([], $this->userIndex); } } $this->auth = false; $this->id = null; $this->sess_cfg = null; } return $this; }

Closes the session in the database. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.