示例#1
0
 /**
  * Build user passport.
  *
  * @param string $email The system provided email
  *
  * @return SessionInterface The current instance
  *
  * @api
  */
 public function createUserPassport(string $email) : SessionInterface
 {
     $data = $this->dbh->getUserAccountProfile($email)->getRecord();
     if (1 !== $data['record_count']) {
         $this->dbh->insertiNetRecordLog($email, '-- Error: DB says user does not exist');
         $this->requestRoute($this->getProperty('redirectLogout') . '/problem_creating_user_passport/');
     }
     $this->isIntranetAccessEnabledForUser($data, $email);
     /* Build passport. */
     $this->loadPassport($this->getPassportItems($data, 'createUserPassport'))->setDatabaseSession();
     $this->sessionManager->get('passport/destination_relay') ?: $this->setPassport('destination_relay', $this->getProperty('redirectPanel') . '/');
     return $this;
 }