This project is read-only.

User Fields vs. Profile Part

Topics: Administration
Dec 3, 2012 at 6:41 PM

What are the advantages/disadvantages of creating new fields in the User Content Type compared to using the Profile Part? Say, for instance, to store First Name, Last Name or maybe an image. When might you use one option vs. the other?



Dec 3, 2012 at 6:42 PM

What profile part?

Dec 3, 2012 at 6:44 PM

Sorry. Contrib.Profile.

Dec 3, 2012 at 6:46 PM

OK. Does it work at all when you add fields to User?

Dec 3, 2012 at 6:52 PM

Sure. I seem to have the choice of storing additional user information either in custom fields added to the User Content Type or I can use fields in the Profile Part. I suspect there are scenarios where one choice is better than the other. I probably don't understand the full purpose of the Contrib.Profile module. Maybe a better question would be what does Contrib.Profile allow me to do that I couldn't do without it?

Dec 3, 2012 at 7:17 PM

And when you add fields to User, they appear in the user editor?

Dec 3, 2012 at 7:29 PM

Yes. If I add a field called First Name to the User Content Type I can edit the user's first name in the user editor. Isn't it supposed to work that way?

I can also add the Profile part to the User Content Type. This Profile part could have a First Name field instead. I understand that the Profile module adds the ability for users to view and edit their profiles. When an authenticated user views his profile through the profile/edit route he can see and edit both User Content Type fields and Profile Part fields. I'm wondering if there is any advantage to using one type of field over the other.

Dec 3, 2012 at 7:33 PM

It used not to, and that's why the profile modules were created. Not sure why that works now, but it seems to me like it makes profile modules less useful. Maybe the front-end editing of the profiles is still useful?

Dec 3, 2012 at 7:44 PM

The front-end viewing and editing of the profiles is very useful. Contrib.Profile is also required to use itWORKS.ExtendedRegistration so I'm going to use the Profile module. I just wanted to know if it makes a difference where I set up the fields. I've only tested the user fields on 1.4.2 and 1.5.1

Dec 9, 2012 at 1:21 PM

What exactly do you mean by "where I set up the fields"?

Dec 10, 2012 at 2:08 PM

I could add a First Name field to the Profile Content Part or to the User Content Type. I'm wondering the pros and cons of using either method.

Dec 10, 2012 at 3:16 PM

Ah. In that case I would add the fields to the Profile content part, since to me that makes more sense. However, from a technical point of view there is no pros or cons with the one or the other, as far as I can tell.

Dec 10, 2012 at 3:34 PM

I suppose there may be cases where you have multiple custom Content Types that share a single Profile part and you wouldn't want to share fields among all the content types. In my case where I just want to customize my user profiles I think adding the fields to the Profile part is best. Thanks to all for your help.

Dec 11, 2012 at 6:46 AM

That makes sense, yes. You're very welcome.