Forums / General / Modifing users class and update the objects

Modifing users class and update the objects

Author Message

andre kurniawan

Wednesday 30 November 2005 3:47:14 pm

Recently, I have to add an attribute to the custom user class. My question is, how do we modify the attribute of custom class(add new attribute or add more option to the selection), and still use the old user objects.
I have experimented with other custom class, and whenever i modify the attribute of this custom class.. this custom class' object no longer visible
any solution for this problem???

Brendan Pike

Wednesday 30 November 2005 6:13:14 pm

This should not be a problem Andre, you didn't alter any original identifiers did you? Please provide more detail about precisely what you added or altered.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

andre kurniawan

Thursday 01 December 2005 2:18:09 am

Thank for the fast responds,
In my original custom class, I have this following attributes:
1. MEMBER ACCOUNT INFORMATION [User account] (id:12)
Name:

MEMBER ACCOUNT INFORMATION

Identifier:

user_account

Flags:

Is required

Is searchable

Does not collect information

Translation is enabled
2. First name [Text line] (id:8)
Name:

First name

Identifier:

first_name

Flags:

Is required

Is searchable

Does not collect information

Translation is enabled
Default value:

Empty
Max string length:

255 characters
3. Last name [Text line] (id:9)
Name:

Last name

Identifier:

last_name

Flags:

Is required

Is searchable

Does not collect information

Translation is enabled
Default value:

Empty
Max string length:

255 characters

and when I try add this following attribute in the class
4. Gender [Selection] (id:251)
Name:

Gender

Identifier:

gender

Flags:

Is not required

Is searchable

Does not collect information

Translation is enabled
Type:

Single choice
Options:
Select One
Male
Female

the user that registered pior the changes will show blank on the admin site. It seems that when I made any changes on the class, the object no longer consider as the same class. This case also happen when I add more option on the selection datatype on any attribute.