]> git.defcon.no Git - hermes/blobdiff - api/lib/user_functions.php
Made default password lenght a config option. Added permittedcalls-info to doc
[hermes] / api / lib / user_functions.php
index f1e660bb55e87ad84caf365d1b82fb49fc50f89d..b15b7410437bf091132f98a6b5f2c3d9f042e748 100644 (file)
@@ -5,10 +5,11 @@ require_once('lib/db_functions.php');
 
 $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 )
         {