- if (!local_user()) {
- $e = new HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a probing.'));
- $e->httpdesc = DI::l10n()->t('Public access denied.');
- throw $e;
+ if (!DI::userSession()->getLocalUserId()) {
+ throw new HTTPException\ForbiddenException(DI::l10n()->t('Only logged in users are permitted to perform a probing.'));