Now all modules are in core modules folder

This commit is contained in:
Manuel Cillero 2017-08-08 12:14:45 +02:00
parent 5ba1cdfa0b
commit 05b6a91b0c
1907 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,43 @@
<?php
/**
* @file
* Password policy constraint callbacks.
*/
/****************************************************************************/
/* Constraint API */
/****************************************************************************/
/**
* Description of the constraint.
*/
function password_policy_constraint_length_description() {
return array('name' => t('Length'), 'description' => t('Password must be longer than the specified minimum length.'));
}
/**
* Error message of the constraint.
*/
function password_policy_constraint_length_error($constraint) {
return format_plural($constraint, 'Password must be at least one character in length.', 'Password must be at least @count characters in length.');
}
/**
* Password validation.
*/
function password_policy_constraint_length_validate($password, $constraint, $uid) {
$length = drupal_strlen($password);
return $length >= $constraint;
}
/**
* Javascript portion.
*/
function password_policy_constraint_length_js($constraint, $uid) {
$s = '';
$s .= " if (!value.length || value.length<$constraint) {\n";
$s .= " strength=\"low\";\n";
$s .= " msg.push(translate.constraint_length);\n";
$s .= " }\n";
return $s;
}