I don't know if this has anything to do with the "takeover profile" discussion, but here it goes:

I created a "business / company" content type in CCK for businesses to use as a "business/company" profile. I am also using content profile along with Michelle's Advanced Profile Kit for a user's main profile.

I had the understanding that content profile would allow multiple profiles based on different roles (or something like that). Anyway, I checked the content profile box in the business / company content type so I could use that content type as an additional profile for businesses. Additionally, I had it set to where users could purchase a business account, and on activation, the "business user" role would automatically get added to their account. Everything appeared to work great. I got a "business page" link next to the "profile" link under the Edit tab in the users profiles. I could "create" a business page right from the user's account editing section. This is where I ran into problems.

When I went to save the business page, I got an error: "You are only allowed to have one profile." I screwed around with it until it finally occurred to me that it was the content-profile module telling me this. So, it appears that content-profile only allows one profile and that I can't have multiple profiles based on roles. Is this how it's supposed to work?

Is there anyway of making this work with multiple profiles based on certain roles? Again, I was under the assumption that I could do this using content-profile.

Comments

mlbinseattle’s picture

After playing around with different profile types and seeing what happens when assign/un-assign roles to users, I discovered a few things that occur at the user account settings:

1.) A user can only have one content profile at a time. It doesn't matter what type it is. In my case, I created two roles: Client/Consumer and Business Owner/Rep. I created two profile types (actually one) with CCK. (I created the business owner profile with CCK and the client/consumer profile came with the content-profile module.)
2.) If you switch a user from a client role to business owner role, the business owner/rep. profile (aka business/company page) appears, but the link for the client/consumer profile remains. Although the client/consumer profile link remains, the actual content for the profile disappears. On the "View" tab of the user account, the user is stuck with the old profile (profile that came with the content-profile module and that I also used with the client/consumer profile/role) with the user of having no way to edit or delete it. If this scenario were turned around....that is, changing a user from business owner/rep. to client/consumer, the same thing would happen, but the business/company page (profile for the business role) AND the link for it disappear from the user account. The user can go to the actual node for the business/company page and delete the content there (if it's intuitively obvious to the user which I doubt it will be...especially a user that isn't familiar with Drupal).

(1 and 2 above were observed from a user's perspective.)

3.) From an admin perspective (logged in as the admin), once a profile is created, it can't be gotten rid of at the user's account. It has to be deleted from the Content menu.

I think I accurately described the scenarios.

The conclusions that I drew from all this:

1.) If you're going to have more than one profile type, then create separate roles for each type. Once a user gets assigned to that role, don't change it. If it must be changed, then the admin will probably have to delete the unwanted profile type from the Content menu.
2.) If you're using a module that automatically assigns a user an additional role, then the user will wind up with more than one profile type and will only be able to edit one at the user account. (That's another thing....the user could edit the "business/company page" at the node but not at the user account if they had both roles....business owner and client/consumer....assigned to them.)

If there were a rule that could appropriately delete the old role and associated content-profile when a user changes roles, then, that would be great. However, it doesn't help a user that has more than one role if there are associated profiles with those roles.

Actually, it would be great if multiple profile types could be assigned, but I don't see this happening the way the content-profile module is at this time.

fago, if you're reading this, please consider modifying the module so that a user can have more than one profile (if they have multiple roles) or, at least, do something with the profile so that the old profile links don't show up on a user account if they change roles (and profiles). With a couple of tweaks, I think you could turn a really good module into a really great module! :)

mlbinseattle’s picture

I figured out another way to solve my problem:

WorldFallz spoke of creating a new tab in the user's account setting using views, and that's what I did ( http://drupal.org/node/370859#comment-1906336 ). I created a new tab using views for the "profile" (actually, a custom page created with CCK), and the tab appears in the user's account edit section. Worked like a charm. I removed the content-profile setting from this content type, and this enabled me to only have one user profile (the one that came with content-profile that I'm using with the Advanced Profile Kit). IOW, I no longer need to have two separate profile types for different roles. Every user will have a profile of the same type, but users will now have an additional tab under their user account edit section that they can link to and edit their "other profile".

I'd still like to see the content-profile module be capable of handling multiple profile types for users. Guess I'll just have to wait.

Erica_der_Whatkin’s picture

Mark me down as another person who'd like to see support for multiple profiles.

excaliburst’s picture

Hi Seattle,

Thanks for your troubleshooting and guide in this.

I would also like to see more than one profile in Content Profile.

BR

Morten E.

Edit pr. 9/3 '10

I solved my profile thing by making a multigroup with the fields that I want in the profile. This way you can just click 'Add item' to add a profile-like field-group. And in as many instances as you want.

xjm’s picture

Tracking.

Boletus’s picture

Subscribing.

mmlr38’s picture

I too would like to see support for multiple profiles. I'm trying to accomplish nearly the exact same thing as mlbinseattle describes in his original post.

Berliner-dupe’s picture

Same problem here.

One user with role "agency" need more profiles with other role "musicans" - one agency has 20 - 30 musicans and for every musican must add a profile - main role "agency" edit and control all musican-profiles over her agency-account.

hedac’s picture

I guess if more than one profile is needed.. you can create any custom content type, give permission to create that content type to the role you want and and try to link a view of nodes of that type created by that user into your user template manually.. not using content profile.

Berliner-dupe’s picture

But the content-type has no "role".

If you use an Exposed Filter for searching User-Roles - this content-Types will not be found but it has no role. It give any more problems with this.

How you will send a Private-Message to this content-type user?

User A (role: agency) has made content-type a,b,c with musicans - other user will send an Message to "content-type b" (musican b) - this is not possible - User A will get the message and so on ...

A content-type is not a realy user.

It give the module "Subuser" but this works incorrect and has a lot of bugs. I cant use it.

hedac’s picture

I understand what you say Berliner.
I think previous versions allowed more than one... or maybe it was the Bio module? I don't remember... but I really don't know why now it is only allowed 1 profile per user... :/