Documentation

isUserGivenConsent

 public static
\Bitrix\Blog\BlogUser::isUserGivenConsent(
  $userId
);

This method checks user consent for a specific blog post when component consent request for personal data processing was enabled. Static method.

This check is performed based on URL, specifically:

  • For the same blog/message, but displayed in different components (with different URLs). The consent is displayed twice, i. e. the user will confirm its consent for each component.
  • When component URL is updated (for example, CNC settings are updated) - displays consent again as well.

Parameters

ParameterDescriptionVersion
$userIdUser ID. Attention! Specifically requires user ID within the system (in the main module) and not the ID for BlogUser.
$agreementIdUser consent agreement ID. The can have several configured user consent requests - check which one specifically is used in this component.

Examples



© «Bitrix24», 2001-2024
Up