$config = get_config();
-// Default length 24 characters to provide a long password
-// that still is short enough that Cisco SPA phones can use it
-function generate_password( $length = 24 )
+function generate_password( $length = null )
{
+ global $config;
+ if ( ! $length ) $length = $config['standard_password_length'];
+
$string = "";
while ( strlen( $string ) < $length )
{