From: Jo-Philipp Wich Date: Wed, 25 Jan 2017 23:21:17 +0000 (+0100) Subject: luci-mod-admin-full: admin: change password in Map.parse() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=472dc4b9e2ca71c114f5da70cb612c1089b8daa7;p=project%2Fluci.git 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 --- diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua index 1e475640be..493a735bde 100644 --- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua +++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/admin.lua @@ -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