This commit is contained in:
Laurent Destailleur (aka Eldy) 2025-01-14 10:35:44 +01:00
parent a25ea27c6b
commit 11d4b973e0
3 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,8 @@ class modGeneratePassNone extends ModeleGenPassword
*/
public function validatePassword($password)
{
dol_syslog("modGeneratePassNone::validatePassword");
return 1;
}
}

View File

@ -221,6 +221,8 @@ class modGeneratePassPerso extends ModeleGenPassword
$this->initAll(); // For the case this method is called alone
dol_syslog("modGeneratePassPerso::validatePassword");
$password_a = preg_split('//u', $password, 0, PREG_SPLIT_NO_EMPTY);
$maj = preg_split('//u', $this->Maj, 0, PREG_SPLIT_NO_EMPTY);
$num = preg_split('//u', $this->Nb, 0, PREG_SPLIT_NO_EMPTY);

View File

@ -125,6 +125,8 @@ class modGeneratePassStandard extends ModeleGenPassword
{
global $langs;
dol_syslog("modGeneratePassStandard::validatePassword");
if (dol_strlen($password) < $this->length2) {
$langs->load("other");
$this->error = $langs->trans("YourPasswordMustHaveAtLeastXChars", $this->length2);