You are here

public function PathContext::setIdentityByUser in Acquia Lift Connector 8

Set Identity by User.

Parameters

\Drupal\user\UserInterface $user: User.

File

src/Service/Context/PathContext.php, line 151
Contains \Drupal\acquia_lift\Service\Context\PathContext.

Class

PathContext

Namespace

Drupal\acquia_lift\Service\Context

Code

public function setIdentityByUser(UserInterface $user) {
  if (empty($this->identitySettings['capture_identity'])) {
    return;
  }
  $this
    ->setIdentity($user
    ->getEmail(), 'email');
}