You are here

public function ProtectionRuleInterface::isProtected in User protect 8

Checks if a given operation on an user should be protected.

Parameters

\Drupal\user\UserInterface $user: The user object to check access for.

string $op: The operation that is to be performed on $user.

\Drupal\Core\Session\AccountInterface $account: The account trying to access the entity.

Return value

bool TRUE if the operation should be protected. FALSE if the operation is not protected by this rule.

1 method overrides ProtectionRuleInterface::isProtected()
ProtectionRule::isProtected in src/Entity/ProtectionRule.php
Checks if a given operation on an user should be protected.

File

src/Entity/ProtectionRuleInterface.php, line 183

Class

ProtectionRuleInterface
Provides an interface defining a userprotect_rule entity.

Namespace

Drupal\userprotect\Entity

Code

public function isProtected(UserInterface $user, $op, AccountInterface $account);