Forum OpenACS Q&A: user properties

Collapse
Posted by Nagita Karunaratne on
Hello,

naive question:  Why are the properties of the 'user' object type not present in the 'acs_attributes' table?

Thanks

Collapse
2: Re: user properties (response to 1)
Posted by Matthew Geddert on
Could you please give an example of the "properties" you are thinking about about?
Collapse
3: Re: user properties (response to 1)
Posted by Nagita Karunaratne on
The 'user' type has a property 'password_question' (with a column of the same name) present in the 'users' table that is not present in table 'acs_properties' while the 'person' type has the 'last_name' attribute that is present in 'acs_properties' and in the 'persons' table.

It just seemed odd and I was wondering why since the datamodel  is generally consistant.

Collapse
5: Re: user properties (response to 1)
Posted by Nagita Karunaratne on
sorry 'acs_properties' should be 'acs_attributes'
Collapse
4: Re: user properties (response to 1)
Posted by Matthew Geddert on
ah, okay, i couldn't answer that definitively, but i can tell you that attributes never became what it was initially planned to do... and thus you have some "half done" stuff in regards to attributes.
Collapse
6: Re: user properties (response to 1)
Posted by Robert Locke on
Matthew is right... it's a bit half-baked right now.

However, I still think it's good practice to use the attribute system atleast to the extent of "documenting" your object attributes.  This involves:

* calling acs_attribute__create_attribute for the various attributes of your object type

* calling define_function_args for your object's methods (ie, __new, etc)

By doing so, you can take advantage of some existing cool features (eg, package_instantiate_object) as well as potential future features which might use the attributes system (eg, dynamic form generation).

Collapse
7: Re: user properties (response to 1)
Posted by Robert Locke on
I should add... the reason none of the "user" attributes are found in the acs_attributes table is because acs_attribute__create_attribute is never called during the creation of the user type.

This should probably be logged in the bug tracker, if it isn't already.