You are here

public function PathContext::setContextIdentityByUser in Acquia Lift Connector 8.4

Same name and namespace in other branches
  1. 8.3 src/Service/Context/PathContext.php \Drupal\acquia_lift\Service\Context\PathContext::setContextIdentityByUser()

Set Context Identity by User.

Parameters

\Drupal\user\UserInterface $user: User.

File

src/Service/Context/PathContext.php, line 166

Class

PathContext

Namespace

Drupal\acquia_lift\Service\Context

Code

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