You are here

public function UserProtectionInterface::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 plugin.

1 method overrides UserProtectionInterface::isProtected()
UserProtectionBase::isProtected in src/Plugin/UserProtection/UserProtectionBase.php
Checks if a given operation on an user should be protected.

File

src/Plugin/UserProtection/UserProtectionInterface.php, line 64

Class

UserProtectionInterface
Defines the interface for user protection plugins.

Namespace

Drupal\userprotect\Plugin\UserProtection

Code

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