Merge pull request #4638 from fblaese/pwlogin

luci-base: hide "No password set!" notification if password login is disabled
This commit is contained in:
Jo-Philipp Wich 2020-12-05 22:54:42 +01:00 committed by GitHub
commit 48d6b6ed12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -509,7 +509,7 @@ user.getuser = nixio.getpw
function user.getpasswd(username)
local pwe = nixio.getsp and nixio.getsp(username) or nixio.getpw(username)
local pwh = pwe and (pwe.pwdp or pwe.passwd)
if not pwh or #pwh < 1 or pwh == "!" or pwh == "x" then
if not pwh or #pwh < 1 then
return nil, pwe
else
return pwh, pwe