R – Confused about user profiles in drupal

drupaldrupal-6profile

I'm very confused about the whole user profile thing in drupal, hope someone can help me out here since I haven't found a clear answer anywhere else.

For starters, where do you set up custom fields for users, is it under 'admin/user/profile' or under 'admin/content/node-type/profile' (with the content_profile Module installed)? I have tried both but only fields that were added in the 'default' user/profile section and set to appear on the registration page actually showed up there. Is it ok to use both or should I stick to using only one?

Once the user is logged in and I go to edit the profile, eg. 'user/1/edit/' no other fields apart from the default ones show up in the resulting form. I can't really imagine that I have to add them manually in the 'themename_user_profile_form' hook?

Would be cool if someone could help me out here or point me to a resource where this is covered.

Edit:
This turned out being the hint I was looking for: http://drupal.org/node/517094 The snipped posted there isn't quite right, what I did was add a new module that hooks into edit_profile_user:

function edit_profile_user ( $op, &$edit, &$account, $category = null )
{
    global $user;
    switch ( $op )
    {
        case 'form':
            return profile_form_profile( $edit, $user, 'Name of the Category' );
    }
}

Best Answer

There's a lovely page about extending user account information in the docs.

Related Topic