luci-mod-admin-full: admin: change password in Map.parse()
Move the password setting into the .parse() callback to ensure that it is updated regardless of whether "Save" or "Save & Apply" has been pressed. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
af2c7d9ebe
commit
472dc4b9e2
1 changed files with 3 additions and 1 deletions
|
@ -21,7 +21,7 @@ function s.cfgsections()
|
|||
return { "_pass" }
|
||||
end
|
||||
|
||||
function m.on_commit(map)
|
||||
function m.parse(map)
|
||||
local v1 = pw1:formvalue("_pass")
|
||||
local v2 = pw2:formvalue("_pass")
|
||||
|
||||
|
@ -36,6 +36,8 @@ function m.on_commit(map)
|
|||
m.message = translate("Given password confirmation did not match, password not changed!")
|
||||
end
|
||||
end
|
||||
|
||||
Map.parse(map)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue