/** * Save the login. * Set a new cryptic, save the DB user and save it in session. * * @param boolean $cookieStayConnected Indicats if the stay connected cookie should be set */ protected function saveLogin($cookieStayConnected = false) { $crypticKey = $this->cfg->getInArray('fields', 'cryptic'); $cryptic = $this->cryptPass(uniqid(), 'Cryptic'); $this->user->set($crypticKey, $cryptic); $this->user->save(); $this->logFromCryptic($cryptic, $cookieStayConnected); }