Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#5380 closed defect (bug) (fixed)

Delete avatar link is showing even if no avatar was uploaded

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


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 10 years ago.
5380.01.diff (1.5 KB) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (7)

10 years ago

#1 @boonebgorges
10 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.

10 years ago

#2 @imath
10 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
10 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
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to 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
8 years ago

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