function ProtectedUserFieldConstraintValidator::__construct
Constructs the object.
Parameters
\Drupal\user\UserStorageInterface $user_storage: The user storage handler.
\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.
File
- 
              core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ ProtectedUserFieldConstraintValidator.php, line 39  
Class
- ProtectedUserFieldConstraintValidator
 - Validates the ProtectedUserFieldConstraint constraint.
 
Namespace
Drupal\user\Plugin\Validation\ConstraintCode
public function __construct(UserStorageInterface $user_storage, AccountProxyInterface $current_user) {
  $this->userStorage = $user_storage;
  $this->currentUser = $current_user;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.