You are here

public function EntityLegalDocumentInterface::userMustAgree in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/EntityLegalDocumentInterface.php \Drupal\entity_legal\EntityLegalDocumentInterface::userMustAgree()
  2. 4.0.x src/EntityLegalDocumentInterface.php \Drupal\entity_legal\EntityLegalDocumentInterface::userMustAgree()

Checks to see if a given user can agree to this document.

Parameters

bool $new_user: Whether or not the user to check is a new user signup or not.

\Drupal\Core\Session\AccountInterface|null $account: The user account to check the access permissions of. Defaults to the current user if none is provided.

Return value

bool Can a user agree to this document.

1 method overrides EntityLegalDocumentInterface::userMustAgree()
EntityLegalDocument::userMustAgree in src/Entity/EntityLegalDocument.php
Checks to see if a given user can agree to this document.

File

src/EntityLegalDocumentInterface.php, line 121

Class

EntityLegalDocumentInterface
Interface EntityLegalDocumentInterface.

Namespace

Drupal\entity_legal

Code

public function userMustAgree($new_user = FALSE, AccountInterface $account = NULL);