function genpass_algorithm_modules in Generate Password 8
Same name and namespace in other branches
- 6 genpass.module \genpass_algorithm_modules()
- 7 genpass.module \genpass_algorithm_modules()
Return an array of all modules which implement hook_password.
2 calls to genpass_algorithm_modules()
- genpass_algorithm_module in ./
genpass.module - Return the currently activated module for generating passwords.
- genpass_form_alter in ./
genpass.module - Implements hook_form_alter().
File
- ./
genpass.module, line 318 - Contains genpass.module.
Code
function genpass_algorithm_modules() {
// Fetch a list of all modules which implement the password generation hook.
// To be in this list, a module must implement a hook, and return random
// passwords as strings.
$return = [];
foreach (\Drupal::moduleHandler()
->getImplementations('password') as $module) {
$return[$module] = $module;
}
return $return;
}