bsw@286: local fields = { bsw@2: "organizational_unit", bsw@2: "internal_posts", bsw@2: "realname", bsw@2: "birthday", bsw@2: "address", bsw@2: "email", bsw@2: "xmpp_address", bsw@2: "website", bsw@2: "phone", bsw@2: "mobile_phone", bsw@2: "profession", bsw@2: "external_memberships", bsw@2: "external_posts", bsw@2: "statement" bsw@286: } bsw@286: bsw@286: local update_args = { app.session.member } bsw/jbe@0: bsw@286: for i, field in ipairs(fields) do bsw@286: if not config.locked_profile_fields[field] then bsw@286: param.update(app.session.member, field) bsw@286: end bsw@286: end bsw@286: bsw@286: if not config.locked_profile_fields.birthday then bsw@286: if tostring(app.session.member.birthday) == "invalid_date" then bsw@286: app.session.member.birthday = nil bsw@286: slot.put_into("error", _"Date format is not valid. Please use following format: YYYY-MM-DD") bsw@286: return false bsw@286: end bsw@75: end bsw@75: bsw/jbe@0: app.session.member:save() bsw/jbe@0: bsw/jbe@0: bsw/jbe@0: slot.put_into("notice", _"Your page has been updated")