Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#5380 closed defect (bug) (fixed)

Delete avatar link is showing even if no avatar was uploaded

Reported by: imath Owned by: boonebgorges
Priority: high Milestone: 2.0
Component: Media Version:
Severity: normal Keywords: has-patch needs-unit-tests
Cc:

Description

Since ​7769 bp_get_user_has_avatar() returns true even if the user haven't uploaded an avatar.
As a result, in change-avatar screen and in the /wp-admin community profile, the link to delete the avatar is showing.
The diff attached seems to solve the issue.

Attachments (2)

5380.diff​ (656 bytes ) - added by imath 13 years ago.
5380.01.diff​ (1.5 KB ) - added by imath 13 years ago.

Download all attachments as: .zip

Change History (7)

#1 @boonebgorges
13 years ago

  • Keywords needs-unit-tests added

Looks good to me. Let's write a unit test so that this doesn't get broken again.

#2 @imath
13 years ago

While working on #5429, i've noticed the bp_get_group_has_avatar() also needed to be adapted. In 5380.01.diff I've included a group id argument to be able to check even if the current group is not set.

#3 @boonebgorges
13 years ago

In 8243:

Ensure bp_get_user_has_avatar() returns false when the default avatar is returned

Necessitated by changes in return values introduced in r7769

See #5380

Props imath

#4 @boonebgorges
13 years ago

  • Owner set to boonebgorges
  • Resolution → fixed
  • Status new → closed

In 8244:

Allow bp_get_group_has_avatar() to accept a group_id param

Also fix some logic that was causing the function to return true when the
group avatar matched the default avatar (meaning that no local avatar had been
uploaded). See r7769

Fixes #5380

Props imath

#5 @DJPaul
10 years ago

  • Component API - Avatars → Media
Note: See TracTickets for help on using tickets.