Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
0 / 0 |
CRAP | |
100.00% |
0 / 0 |
ProtectedUserFieldConstraint | |
100.00% |
1 / 1 |
|
100.00% |
0 / 0 |
0 | |
100.00% |
0 / 0 |
<?php | |
/** | |
* @file | |
* Contains \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint. | |
*/ | |
namespace Drupal\user\Plugin\Validation\Constraint; | |
use Symfony\Component\Validator\Constraint; | |
/** | |
* Checks if the plain text password is provided for editing a protected field. | |
* | |
* @Constraint( | |
* id = "ProtectedUserField", | |
* label = @Translation("Password required for protected field change", context = "Validation") | |
* ) | |
*/ | |
class ProtectedUserFieldConstraint extends Constraint { | |
/** | |
* Violation message. | |
* | |
* @var string | |
*/ | |
public $message = "Your current password is missing or incorrect; it's required to change the %name."; | |
} |