liquid_feedback_frontend
diff app/main/api/_profile.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
author | bsw/jbe |
---|---|
date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/api/_profile.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -0,0 +1,22 @@ 1.4 +local profile = param.get("profile", "table") 1.5 + 1.6 +local r = json.object() 1.7 + 1.8 +for i, field in ipairs(config.member_profile_fields) do 1.9 + if profile.profile[field.id] then 1.10 + r[field.id] = profile.profile[field.id] or json.null 1.11 + end 1.12 +end 1.13 +--[[ 1.14 +if profile.statement then 1.15 + if request.get_param{ name = "statement_format" } == "html" then 1.16 + r.statement = profile:get_content("html") 1.17 + r.statement_format = "html" 1.18 + else 1.19 + r.statement = profile.statement 1.20 + r.statement_format = profile.formatting_engine 1.21 + end 1.22 +end 1.23 +--]] 1.24 + 1.25 +return r