Check if username exists

Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com>
This commit is contained in:
Liviu-Mihail Concioiu 2023-03-03 23:17:12 +01:00
parent ccb799e776
commit 292a12d2fe

View File

@ -516,7 +516,7 @@ Functions.checkPasswordStrength = function (value, meterObject, meterObjectLabel
'my',
'admin',
];
if (username !== null) {
if (username) {
customDict.push(username);
}
@ -584,7 +584,7 @@ Functions.suggestPassword = function (passwordForm) {
passwordForm.elements.pma_pw2.value = passwd.value;
var meterObj = $jQueryPasswordForm.find('meter[name="pw_meter"]').first();
var meterObjLabel = $jQueryPasswordForm.find('span[name="pw_strength"]').first();
Functions.checkPasswordStrength(passwd.value, meterObj, meterObjLabel);
Functions.checkPasswordStrength(passwd.value, meterObj, meterObjLabel, passwordForm.elements.username.value);
return true;
};