Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is there any way to use pcp in combination with the User role field module? Right now, the module calculates user profile completeness by taking all the user fields, also the ones which do not apply for the current user role.
Any help would be appreciated!
Comment | File | Size | Author |
---|---|---|---|
#3 | User-role-field-module-integration-2350729-3.patch | 1.99 KB | perennial.sky |
#1 | User-role-field-module-integration-2350729-1.patch | 1.63 KB | perennial.sky |
Comments
Comment #1
perennial.sky CreditAttribution: perennial.sky commentedHello Attila
This patch may solve your problem.
Comment #2
subhojit777Provide a comment saying that you are restricting profile completeness for fields which user do not has access.
Parameter definition missing for $fields
Incorrect function name. Function names should start with module machine name.
Is is required? You can get $user object from pcp_get_complete_percentage_data() itself.
There should be a new line.
Comment #3
perennial.sky CreditAttribution: perennial.sky commentedThank you subhojit777 for such a good review
Here is a new patch
Comment #4
perennial.sky CreditAttribution: perennial.sky commentedComment #5
BarisW CreditAttribution: BarisW at LimoenGroen commentedThanks for the patch. I tweaked it a little bit and committed it.