modulesfeature-user-table.php

Functions

generate_password()

generate_password(string  $length) : string

Generates a new (cryptographically secure) random password that's also readable (i.e. consonant-vowel-consonant).

This implementation may be changed in the future to use random dictionary words instead - ref https://xkcd.com/936/

Parameters

string $length

The length of password to generate.

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Call Stack: 0.0007 401624 1. {main}() /home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc:0 0.0486 2278744 2. require('phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/bin/phpdoc') /home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc:10 0.1048 11884520 3. phpDocumentor\Application->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/bin/phpdoc:23 0.1058 12089344 4. Cilex\Provider\Console\ContainerAwareApplication->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Application.php:183 0.1059 12089344 5. Cilex\Provider\Console\ContainerAwareApplication->doRun() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Application.php:126 0.1060 12089344 6. Cilex\Provider\Console\ContainerAwareApplication->doRunCommand() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Application.php:195 0.1060 12089344 7. phpDocumentor\Command\Project\RunCommand->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Application.php:874 0.1062 12093272 8. phpDocumentor\Command\Project\RunCommand->execute() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257 0.2876 17871696 9. phpDocumentor\Transformer\Command\Project\TransformCommand->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Command/Project/RunCommand.php:275 0.2877 17873864 10. phpDocumentor\Transformer\Command\Project\TransformCommand->execute() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257 0.3309 21077656 11. phpDocumentor\Console\Output\Output->writeTimedLog() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Command/Project/TransformCommand.php:206 0.3310 21077656 12. call_user_func_array:{phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Console/Output/Output.php:59}() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Console/Output/Output.php:59 0.3310 21077672 13. phpDocumentor\Transformer\Transformer->execute() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Console/Output/Output.php:59 0.3318 21085696 14. phpDocumentor\Transformer\Transformer->transformProject() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Transformer.php:141 0.8937 24277704 15. phpDocumentor\Transformer\Transformer->applyTransformationToProject() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Transformer.php:275 0.8937 24277864 16. phpDocumentor\Plugin\Twig\Writer\Twig->transform() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Transformer.php:312 0.9568 25237712 17. Twig_Environment->render() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Plugin/Twig/Writer/Twig.php:116 0.9569 25247544 18. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->render() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php:334 0.9569 25264056 19. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->display() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:366 0.9570 25265184 20. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->displayWithErrorHandling() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:355 0.9570 25265184 21. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->doDisplay() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:381 0.9570 25265560 22. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->display() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:25 0.9570 25266256 23. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->displayWithErrorHandling() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:355 0.9570 25266256 24. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->doDisplay() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:381 0.9604 25329760 25. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->displayBlock() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:312 0.9604 25329760 26. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->block_content() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:167 0.9611 25348992 27. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->displayBlock() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:423 0.9611 25348992 28. __TwigTemplate_daae0115ec37e5a0b571749c1314278fe63bff5db2e95ba142e0832d4760b44d->block_method() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:167 0.9614 25350384 29. twig_length_filter() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:140 Warning: count(): Parameter must be an array or an object that implements Countable in phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1293 Call Stack: 0.0007 401624 1. {main}() /home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc:0 0.0486 2278744 2. require('phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/bin/phpdoc') /home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc:10 0.1048 11884520 3. phpDocumentor\Application->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/bin/phpdoc:23 0.1058 12089344 4. Cilex\Provider\Console\ContainerAwareApplication->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Application.php:183 0.1059 12089344 5. Cilex\Provider\Console\ContainerAwareApplication->doRun() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Application.php:126 0.1060 12089344 6. Cilex\Provider\Console\ContainerAwareApplication->doRunCommand() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Application.php:195 0.1060 12089344 7. phpDocumentor\Command\Project\RunCommand->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Application.php:874 0.1062 12093272 8. phpDocumentor\Command\Project\RunCommand->execute() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257 0.2876 17871696 9. phpDocumentor\Transformer\Command\Project\TransformCommand->run() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Command/Project/RunCommand.php:275 0.2877 17873864 10. phpDocumentor\Transformer\Command\Project\TransformCommand->execute() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257 0.3309 21077656 11. phpDocumentor\Console\Output\Output->writeTimedLog() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Command/Project/TransformCommand.php:206 0.3310 21077656 12. call_user_func_array:{phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Console/Output/Output.php:59}() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Console/Output/Output.php:59 0.3310 21077672 13. phpDocumentor\Transformer\Transformer->execute() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Console/Output/Output.php:59 0.3318 21085696 14. phpDocumentor\Transformer\Transformer->transformProject() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Transformer.php:141 0.8937 24277704 15. phpDocumentor\Transformer\Transformer->applyTransformationToProject() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Transformer.php:275 0.8937 24277864 16. phpDocumentor\Plugin\Twig\Writer\Twig->transform() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Transformer/Transformer.php:312 0.9568 25237712 17. Twig_Environment->render() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/src/phpDocumentor/Plugin/Twig/Writer/Twig.php:116 0.9569 25247544 18. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->render() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php:334 0.9569 25264056 19. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->display() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:366 0.9570 25265184 20. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->displayWithErrorHandling() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:355 0.9570 25265184 21. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->doDisplay() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:381 0.9570 25265560 22. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->display() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:25 0.9570 25266256 23. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->displayWithErrorHandling() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:355 0.9570 25266256 24. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->doDisplay() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:381 0.9604 25329760 25. __TwigTemplate_e9b916bc8ec0395bf82abe33efb058fa2ccd8b51a970b8ce47218fc40bb2c6c1->displayBlock() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:312 0.9604 25329760 26. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->block_content() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:167 0.9611 25348992 27. __TwigTemplate_02ba832c2ea972798e806ba44910ce32645ca11f1a2988694d0e257df1bd7d72->displayBlock() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:423 0.9611 25348992 28. __TwigTemplate_daae0115ec37e5a0b571749c1314278fe63bff5db2e95ba142e0832d4760b44d->block_method() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Template.php:167 0.9617 25350384 29. twig_length_filter() phar:///home/sbrl/Documents/code/php/peppermint/build/_tmp/phpdoc/vendor/twig/twig/lib/Twig/Environment.php(390) : eval()'d code:140

Returns

string —

The generated random password.