method addToken documentation in bbn\User

Generates and insert a token in database.

function() { if ($this->auth) { $token = Str::genpwd(32, 16); $f = &$this->class_cfg['arch']['tokens']; if ($this->db->insert( $this->class_cfg['tables']['tokens'], [ $f['id_session'] => $this->getIdSession(), $f['content'] => $token, $f['creation'] => X::microtime(), $f['last'] => X::microtime() ] )) { return $token; } } return null; }

Generates and insert a token in 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.