Generates a random password drawn from the defined set of characters.

Uses random_lib library to create passwords with far less predictability.


  • Full name: generate_random_password
  • Defined in: cms/core/Shared/Helpers/core.php

Parameters

Parameter Type Description
$length int Optional. The length of password to generate. Default 12.
$specialChars bool Optional. Whether to include standard special characters.
Default true.
$extraSpecialChars bool Optional. Whether to include other special characters.
Default false.

Return Value

string

The system generated password.