I'm trying to create a new UserAttribute, but it doesn't seem to "stick" in the database. I'm not supposed to manualy add it in the database am I?
I can create it with new SimpleUserAttribute(...), but when I read it later in the code I get an exception saying the Attribute does not exist.
What am I missing?
In StarCommunity 2.4 you are not able to add a UserAttribute from code, you have to add it manually in the database. This is described in "A Programmer's Guide to StarCommunity 2.4" in section "Dynamic User Attributes".
This section states that attributes are stored in
To create a new attribute, add a new row to the table and chose the attribute type id:
0 = Checkbox1 = DropDown2 = ListBox3 = RadioButton4 = TextArea5 = TextField
This will cause the admin interface to render the correct ASP.Net control. To make the attribute a multi-choice attribute, add the choices for the added attribute to the
table and make the connection.
Hope this helps!
ps. I will make sure we add this version of A Programmer's Guide to the download section.