function _password_policy_constraint_js in Password Policy 7
Same name and namespace in other branches
- 6 password_policy.module \_password_policy_constraint_js()
Gets JavaScript code from the constraint to be added to password validation.
Parameters
string $name: Name of the constraint.
string $constraint: Constraint value.
object $account: User object.
Return value
string JavaScript code snippet for the constraint.
1 call to _password_policy_constraint_js()
- password_policy_add_policy_js in ./
password_policy.module - Adds password policy JS.
File
- ./
password_policy.module, line 1347 - Allows enforcing restrictions on user passwords by defining policies.
Code
function _password_policy_constraint_js($name, $constraint, $account) {
_password_policy_constraints();
if (function_exists('password_policy_constraint_' . $name . '_js')) {
return call_user_func('password_policy_constraint_' . $name . '_js', $constraint, $account);
}
}