Hi,
I have two profiles roles at my website(Producers and Fans) and it have their own fields, eg.
Producers:
Name
Bio
Songs
Url
Fans:
Name
About me
Music Styles
Url
So, in the configuration page of the PCP module appear all this fields like:
Name
Bio
Songs
Url
Name
About me
Music Styles
Url
I check all of them but when a Producer or a Fan access they own profiles the tip shows one of all this fields and if the field owner have a different role the page display access denied when he try to access to fill the field.
I want to display the producers field only for producers and the fans field for fans.
Sorry about my english.
Thanks for help me.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | pcp-support_Profile_role-852846-5.patch | 711 bytes | FooZee |
Comments
Comment #1
BarisW commentedHi Lesley,
this sounds like something I can fix. However: how do you manage to get role-specific profile fields? Are you using a module for it? If so: which one?
Comment #2
lesleyfernandes commentedI'm using Profile Role http://drupal.org/project/profile_role
Comment #3
BarisW commentedOk, thanks. I'll have a look in the next couple of days
Comment #4
marty.true commentedAny word on this issue? I am having the same exact dilemma...
If I have a profile field in category "A" marked as include in PCP but it is in a profile category that only a certain role has, it still shows to all users as a field to be completed.
I too am using Profile Role...
Thanks for looking into this!
Comment #5
FooZee commentedOk
Now I've been waiting for a while, but no one came up with a solution, and my client started asking for this function strongly, so I had to dig in the code myself and her we go, I found a solution (that worked for me) and I'm NOT very experienced in Drupal module development, so please correct me I'm wrong :)
This patch, makes the block only show fields corresponding to the role which the current user belongs to :) (the patch is against 6.x-2.1 stable release)
Comment #6
BarisW commentedThanks Mahmoud,
the patch is working great! Apologies for not fixing it earlier, all of my spare time went into the www.drupal7releaseparty.org website.
I've changed it a little bit to confirm to the Drupal coding standards.
And I used a variable $profile_role_used so we don't have to do the module_exist check on every field.
I'll add it to the next release. Great work!
Comment #7
BarisW commentedAdded to 6.x-2.2