/** * 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); }
/** * 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()); }