Link to the content profile creation page shown even if profile exists
Lapino - April 27, 2008 - 15:45
| Project: | Content Profile |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
I have the following combinations of settings:
User page display style: Don't display this content profile on the user account page
Show a link to the content profile creation page, if there is no profile: Checked
Expected results: When user goes to his/her account page and they have no contentprofile, a link is displayed to the creation page. In all other cases, nothing is shown on the page.
Actual results: When user goes to his/her account page, a link to the creation page is ALWAYS displayed, whether they have already created a contentprofile or not.

#1
Attached patch seems to fix it. (See further for right patch)
#2
hm, I can't apply your patch. Please create a patch for the whole module -> http://drupal.org/patch
Furthermore make sure to add a space between ($node, $uid)) according to the coding styles.
#3
This changed patch should work when applied in module directory (I don't have a full CVS drupal installation on this PC at the moment, sorry).
#4
#5
I took this patch one step further and added an access check, in the event that a site has other people editing the user profile. This patch adds a check for "administer nodes" or "edit any profile content" permission.
#6
Although now that I'm using the patch I just submitted, I realize it isn't that usefull since the profile author still must manually be set to the correct user.
#7
thanks for the report, however the patch #3 didn't work and a new permission (#5) makes no sense. Anyway, I've fixed it in 6.x-dev.
#8
Automatically closed -- issue fixed for two weeks with no activity.