Esempio n. 1
0
 /**
  * Removes the Users Database Session and Token from Record.
  *
  * @param string $method The type of logout ['auto', 'user']
  *
  * @return SessionInterface The current instance
  *
  * @api
  */
 public function destroyDatabaseSession(string $method = 'auto') : SessionInterface
 {
     if ($this->sessionManager->has('passport/token')) {
         $event_message = 'auto' === $method ? '-- Auto Exit' : '-- User Exit';
         $email_rec = !$this->sessionManager->has('passport/email') ? 'non available' : $this->getPassport('email');
         $this->dbh->insertiNetRecordLog($email_rec, $event_message);
         $this->dbh->destroyDatabaseSession($this->getPassport('token'));
     }
     return $this;
 }