Changeset 8153

Show
Ignore:
Timestamp:
01/06/12 17:42:02 (18 months ago)
Author:
jow
Message:

modules/admin-full: set password of logged in user instead of unconditionally using root, thanks Viktar Palstsiuk <viktar.palstsiuk@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/modules/admin-full/luasrc/model/cbi/admin_system/admin.lua

    r8070 r8153  
    3939    if v1 and v2 and #v1 > 0 and #v2 > 0 then 
    4040        if v1 == v2 then 
    41             if luci.sys.user.setpasswd("root", v1) == 0 then 
     41            if luci.sys.user.setpasswd(luci.dispatcher.context.authuser, v1) == 0 then 
    4242                m.message = translate("Password successfully changed!") 
    4343            else