diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-01-06 16:42:02 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-01-06 16:42:02 +0000 |
commit | c043db651871e92b2cc8d5cde55655f72873931e (patch) | |
tree | bb951f6d107bf0fb57aedf5538fa3fe018e7b3d3 /modules/admin-full/luasrc/model | |
parent | 1e0e458ff3a2ab0ff9b415c5b2ae1a4977aa1463 (diff) |
modules/admin-full: set password of logged in user instead of unconditionally using root, thanks Viktar Palstsiuk <viktar.palstsiuk@promwad.com>
Diffstat (limited to 'modules/admin-full/luasrc/model')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_system/admin.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/admin.lua b/modules/admin-full/luasrc/model/cbi/admin_system/admin.lua index fbc0dfcb6c..a3da6beb6f 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/admin.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/admin.lua @@ -38,7 +38,7 @@ function m.on_commit(map) if v1 and v2 and #v1 > 0 and #v2 > 0 then if v1 == v2 then - if luci.sys.user.setpasswd("root", v1) == 0 then + if luci.sys.user.setpasswd(luci.dispatcher.context.authuser, v1) == 0 then m.message = translate("Password successfully changed!") else m.message = translate("Unknown Error, password not changed!") |