diff --git a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php index d9688edfcd2..e5f1f77c00c 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassNone.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassNone.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,20 +38,6 @@ class modGeneratePassNone extends ModeleGenPassword public $picto = 'fa-keyboard'; - /** - * Minimum length (text visible by end user) - * - * @var int - */ - public $length; - - /** - * Minimum length in number of characters - * - * @var integer - */ - public $length2; - /** * Constructor * @@ -62,7 +49,7 @@ class modGeneratePassNone extends ModeleGenPassword public function __construct($db, $conf, $langs, $user) { $this->id = "none"; - $this->length = 0; + $this->length = '0'; $this->length2 = 0; $this->db = $db; diff --git a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php index e3769c66f78..a588e62eeef 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassPerso.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2006-2011 Laurent Destailleur * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,20 +40,6 @@ class modGeneratePassPerso extends ModeleGenPassword public $picto = 'fa-shield-alt'; - /** - * Minimum length (text visible by end user) - * - * @var int - */ - public $length; - - /** - * Minimum length in number of characters - * - * @var integer - */ - public $length2; - public $NbMaj; public $NbNum; public $NbSpe; diff --git a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php index 026ec34a852..53f40260dbc 100644 --- a/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php +++ b/htdocs/core/modules/security/generate/modGeneratePassStandard.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,20 +38,6 @@ class modGeneratePassStandard extends ModeleGenPassword public $picto = 'fa-shield-alt'; - /** - * Minimum length (text visible by end user) - * - * @var int - */ - public $length; - - /** - * Minimum length in number of characters - * - * @var integer - */ - public $length2; - /** * Constructor * @@ -62,7 +49,7 @@ class modGeneratePassStandard extends ModeleGenPassword public function __construct($db, $conf, $langs, $user) { $this->id = "standard"; - $this->length = 12; + $this->length = '12'; $this->length2 = 12; $this->db = $db; diff --git a/htdocs/core/modules/security/generate/modules_genpassword.php b/htdocs/core/modules/security/generate/modules_genpassword.php index ec17cac6e9b..a463f11b061 100644 --- a/htdocs/core/modules/security/generate/modules_genpassword.php +++ b/htdocs/core/modules/security/generate/modules_genpassword.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -63,6 +64,20 @@ abstract class ModeleGenPassword */ public $user; + /** + * Minimum length (text visible by end user) + * + * @var string + */ + public $length; + + /** + * Minimum length in number of characters + * + * @var integer + */ + public $length2; + /** * Return if a module can be used or not *