[SOLVED] How add a property in portal_memberdata dinamically

Hello,

I want add property user to (portal_memberdata) using code and not update day by day. it's would be auto-add so dinamically.

I read on the Plone Docs:

New properties must be explicitly declared in portal_memberdata

There's any way to find it out?

Thanks

I use generic setup to setup the memberdata properties. Two Files are available, but i'm not sure if it necessary that both are manipulate. memberdata.xml and memberdata_properties.xml. you can export these files via portal_setup.

I know how edit and add fields by that way. But this won't be a "dinamically" solution.

Perhaps:

portal_memberdata = getToolByName(site, "portal_memberdata")
if not portal_memberdata.hasProperty("home_folder_uid"):
    portal_memberdata.manage_addProperty(id="home_folder_uid", value="", type="string")

2 Likes

thank you wou save me.. I not understand how you wanna said before!