public function DataPolicyConsentManager::needConsent in Data Policy 8
Check if user gave consent on a current version of data policy.
Return value
bool TRUE if consent is needed.
Overrides DataPolicyConsentManagerInterface::needConsent
File
- src/
DataPolicyConsentManager.php, line 96
Class
- DataPolicyConsentManager
- Defines the Data Policy Consent Manager service.
Namespace
Drupal\data_policyCode
public function needConsent() {
return $this
->isDataPolicy() && !$this->currentUser
->hasPermission('without consent');
}