コード例 #1
0
 /**
  * Sets the current user to the given $user.
  *
  * @param \eZ\Publish\API\Repository\Values\User\User $user
  */
 public function setCurrentUser(User $user)
 {
     $this->currentUser = $user;
     $this->authenticator->setUserId($user->id);
 }
コード例 #2
0
 /**
  * Sets the current user to the given $user.
  *
  * @param \eZ\Publish\API\Repository\Values\User\UserReference $user
  *
  * @return void
  */
 public function setCurrentUser(UserReference $user)
 {
     $this->currentUser = $user;
     $this->authenticator->setUserId($user->getUserId());
 }