You are here

function cas_validation_constraint_alter in CAS 2.x

Same name and namespace in other branches
  1. 8 cas.module \cas_validation_constraint_alter()

Implements hook_validation_constraint_alter().

Replace core's ProtectedUserFieldConstraint with a decorated version that skips over the validation if restricted password mangement is enabled.

File

./cas.module, line 270
Provides CAS authentication for Drupal.

Code

function cas_validation_constraint_alter(array &$definitions) {
  $definitions['ProtectedUserField']['class'] = 'Drupal\\cas\\Plugin\\Validation\\Constraint\\CasProtectedUserFieldConstraint';
}