class Username_Constraint in Password Policy 5
Hierarchy
- class \Constraint
- class \Username_Constraint
Expanded class hierarchy of Username_Constraint
File
- constraints/
constraint_username.php, line 10
View source
class Username_Constraint extends Constraint {
function validate($plaintext_password, $user = NULL) {
return drupal_strtolower($user->name) != drupal_strtolower($plaintext_password);
}
function getDescription() {
return t('Password must differ from the username. Put any positive number to enforce this policy.');
}
function getValidationErrorMessage() {
return t('Password must differ from the username.');
}
function _charIsValid($character) {
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Constraint:: |
property | |||
Constraint:: |
property | |||
Constraint:: |
property | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Constraint:: |
function | |||
Username_Constraint:: |
function |
Overrides Constraint:: |
||
Username_Constraint:: |
function |
Overrides Constraint:: |
||
Username_Constraint:: |
function |
Overrides Constraint:: |
||
Username_Constraint:: |
function |