Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
William Gosse
Adding custom fields to existing users
January 20, 2011 8:06 AM
Answer

William Gosse

Rank: Regular Member

Posts: 108

Join Date: July 4, 2010

Recent Posts

I recently added a custom field to existing users. I noticed that I when I retrieved this new field using the API it came back null. I had to resave the user profile before it worked correctly.
Ali Shahrami
RE: Adding custom fields to existing users
January 20, 2011 9:22 AM
Answer

Ali Shahrami

Rank: Junior Member

Posts: 52

Join Date: July 31, 2009

Recent Posts

Bill,

If you are referring to Custom Attribute, in Liferay 5.2.3, then I believe this is a normal behavior.

You can take a look at the "expandovalue" table and see how many users have values for the Custom Attribute (map classPK with userId).

It would have been great to assign default value to exiting users once a Custom Attribute is created. You probably have to write your own process to do that.

Ali
Jonas Yuan
RE: Adding custom fields to existing users
January 20, 2011 11:41 AM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Bill,

It would be better for you to use Liferay 6.

As mentioned by @Ali, you would get many new features in Liferay 6.

Thanks

Jonas Yuan
William Gosse
RE: Adding custom fields to existing users
January 31, 2011 7:54 AM
Answer

William Gosse

Rank: Regular Member

Posts: 108

Join Date: July 4, 2010

Recent Posts

I'm using 6.05.
Jonas Yuan
RE: Adding custom fields to existing users
January 31, 2011 1:10 PM
Answer

Jonas Yuan

Rank: Liferay Master

Posts: 993

Join Date: April 26, 2007

Recent Posts

Hi Bill,

Thanks. Could you be able to paste your custom code here?

Thus it may be easy to narrow down the issue you had.

Jonas Yuan
==================
The Author of Liferay Books:
Liferay User Interface Development
Liferay Portal 6 Enterprise Intranets
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Hitoshi Ozawa
RE: Adding custom fields to existing users
January 31, 2011 1:58 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Even with Liferay6.0.5, that is the expected behavior. You have to check for this in your program.