luci-0.10: merge r8792

This commit is contained in:
Jo-Philipp Wich 2012-06-27 13:53:46 +00:00
parent 3dff5debf2
commit cc1007d471
2 changed files with 4 additions and 4 deletions

View file

@ -557,6 +557,7 @@ $(eval $(call translation,malay,Malay (by Teow Wai Chet)))
$(eval $(call translation,norwegian,Norwegian (by Lars Hardy)))
$(eval $(call translation,hebrew,Hebrew))
$(eval $(call translation,romanian,Romanian))
$(eval $(call translation,romanian2,Romanian2))
### Collections ###

View file

@ -612,11 +612,10 @@ end
-- @return Boolean indicating wheather the passwords are equal
function user.checkpasswd(username, pass)
local pwh = user.getpasswd(username)
if pwh and nixio.crypt(pass, pwh) ~= pwh then
return false
else
return true
if pwh then
return (nixio.crypt(pass, pwh) == pwh)
end
return false
end
--- Change the password of given user.