diff --git a/lib/private/Activity/Manager.php b/lib/private/Activity/Manager.php index 7f95771294a..6bf042efe1a 100644 --- a/lib/private/Activity/Manager.php +++ b/lib/private/Activity/Manager.php @@ -334,12 +334,8 @@ class Manager implements IManager { * Set the user we need to use * * @param string|null $currentUserId - * @throws \UnexpectedValueException If the user is invalid */ public function setCurrentUserId(?string $currentUserId = null): void { - if (!is_string($currentUserId) && $currentUserId !== null) { - throw new \UnexpectedValueException('The given current user is invalid'); - } $this->currentUserId = $currentUserId; } diff --git a/lib/public/Activity/IManager.php b/lib/public/Activity/IManager.php index 3d364874e5e..06b2ef27259 100644 --- a/lib/public/Activity/IManager.php +++ b/lib/public/Activity/IManager.php @@ -165,7 +165,6 @@ interface IManager { * Set the user we need to use * * @param string|null $currentUserId - * @throws \UnexpectedValueException If the user is invalid * @since 9.0.1 */ public function setCurrentUserId(?string $currentUserId = null): void;