Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3977 closed enhancement (fixed)

"Delete Avatar" link should not show up if user did not upload an avatar

Reported by: heruputra's profile heruputra Owned by:
Milestone: 1.6 Priority: normal
Severity: normal Version: 1.5
Component: Core Keywords: has-patch
Cc:

Description

when user delete their avatar, their avatar will change to the default avatar (wp-content/plugins/buddypress/bp-core/images/mystery-man.jpg) and avatar’s delete link is not disappear.

i think “delete link” should disappear when a user use a default avatar.

i mean not “change the default avatar”, but when a user use default avatar, i want the delete avatar link disappear.

because the fact is when user do not upload any avatar and the default avatar appear but delete link is not disappear. its weird if i am the user, because i do not upload any avatar but there are a link to delete avatar in change avatar page

how to solve this problem ?
thank you.

Attachments (1)

3977.01.patch (576 bytes) - added by r-a-y 13 years ago.

Download all attachments as: .zip

Change History (7)

@r-a-y
13 years ago

#1 @r-a-y
13 years ago

  • Keywords has-patch added
  • Severity changed from major to normal
  • Version changed from 1.5.3 to 1.5

Confirmed. Here's a quick patch against trunk.

#2 @r-a-y
13 years ago

  • Summary changed from Buddypress Default Avatar to "Delete Avatar" link should not show up if user did not upload an avatar

#3 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to 1.6
  • Type changed from defect (bug) to enhancement

Good patch, it works, but: should we worry about the check failing because there are different filters used in bp_core_avatar_default() and bp_core_avatar_default()? Should we make those filters identical?

#4 @r-a-y
13 years ago

Yes, that's a valid concern.

I suppose you're referring to the following filters?

  • 'bp_core_mysteryman_src'
  • 'bp_core_default_avatar_$object' (or rather 'bp_core_default_avatar_user')

#5 @johnjamesjacoby
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5762]) Move bp_get_user_has_avatar() into bp-core-avatars.php and add comparison to bp_core_avatar_default(). Fixes #3977. Props r-a-y, paulgibbs.

#6 @johnjamesjacoby
13 years ago

Committed working patch. Iterate on trunk if you want to improve it.

Note: See TracTickets for help on using tickets.