Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3977 closed enhancement (fixed)

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

Reported by: heruputra Owned by:
Priority: normal Milestone: 1.6
Component: Core Version: 1.5
Severity: normal 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 15 years ago.

Download all attachments as: .zip

Change History (7)

@r-a-y
15 years ago

#1 @r-a-y
15 years ago

  • Keywords has-patch added
  • Severity majornormal
  • Version 1.5.31.5

Confirmed. Here's a quick patch against trunk.

#2 @r-a-y
15 years ago

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

#3 @DJPaul
15 years ago

  • Milestone Awaiting Review1.6
  • Type defect (bug)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
15 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
15 years ago

  • Resolutionfixed
  • Status newclosed

(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
15 years ago

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

Note: See TracTickets for help on using tickets.