File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -369,12 +369,12 @@ function pwd_is_enabled($hash) {
369369 * @return String password
370370 */
371371function generateRandomPassword ($ length = 14 , bool $ checkStrength = true ): string {
372- $ minLength = $ _SESSION ['cfgMain ' ]->passwordMinLength ;
372+ $ cfg = $ _SESSION ['cfgMain ' ] ?? new LAMCfgMain ();
373+ $ minLength = $ cfg ->passwordMinLength ;
373374 $ length = max ($ length , $ minLength );
374375 if (isset ($ _SESSION ['config ' ]) && is_numeric ($ _SESSION ['config ' ]->getPwdPolicyMinLength ())) {
375376 $ length = max ($ length , $ _SESSION ['config ' ]->getPwdPolicyMinLength ());
376377 }
377- $ cfg = $ _SESSION ['cfgMain ' ] ?? new LAMCfgMain ();
378378 $ listAll = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-_ ' ;
379379 $ allLength = strlen ($ listAll );
380380 $ listLower = 'abcdefghijklmnopqrstuvwxyz ' ;
You can’t perform that action at this time.
0 commit comments