<% if _SESSION["logined"] ~= nil then local domain = _POST["domain"] local user = _POST["user"] local oldname = _POST["oldname"] local resetstat = _POST["resetstat"] or nil if user ~= nil then user = json.decode(user) if oldname ~= user.username then local result, bADuser = c_UserExist(domain,user.username) if result == true then if bADuser == true then print("4") else print("0") end else c_DeleteUser(domain,oldname) AddUser(domain,user) print("1") end else if resetstat ~= nil then c_ResetUserStatistic(domain,user.username) end local userdata = c_GetUser(domain,user.username) if userdata ~= nil and userdata.enable_two_factor ~= user.enable_two_factor then c_KickSessionByName(domain,user.username) end AddUser(domain,user) print("1") end end else print("-1") end %>