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

Lapino - May 11, 2008 - 14:54
Status:active» patch (code needs review)

Attached patch seems to fix it. (See further for right patch)

#2

fago - May 7, 2008 - 11:03
Status:patch (code needs review)» patch (code needs work)

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

Lapino - May 11, 2008 - 14:54

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).

AttachmentSize
addlink.patch933 bytes

#4

Lapino - May 11, 2008 - 14:55
Status:patch (code needs work)» patch (code needs review)

#5

jhedstrom - May 27, 2008 - 22:37

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.

AttachmentSize
content_profile.module.patch815 bytes

#6

jhedstrom - May 27, 2008 - 22:40

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

fago - June 20, 2008 - 10:05
Status:patch (code needs review)» fixed

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

Anonymous (not verified) - July 4, 2008 - 10:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.