Skip to:

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3405 closed enhancement (wontfix)

bp_core_fetch_avatar() not getting most recently uploaded avatar

Reported by: kchun's profile KChun Owned by:
Milestone: 1.2.9 Priority: normal
Severity: minor Version:
Component: Core Keywords:


Version 1.2.9

in bp-core-avatars.php line 163, rewrite code to choose the most recent file time if there are more than 1 set of avatars.

Check for array
if ( 0 < count( $avatar_files ) ) {


Check for current avatar
foreach( $avatar_files as $key => $value ) {

if ( strpos ( $value, $avatar_size )!== false ) {

if($avatar_file_time < ($t=filemtime($avatar_home_path . '/' . $value))) {


$avatar_url = $avatar_folder_url . '/' . $avatar_files[$key];




Change History (4)

#2 @DJPaul
13 years ago

  • Type changed from defect to enhancement

Core never stores more than one avatar. The old avatars should be removed after the cropping stage is completed.

#3 @DJPaul
13 years ago

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

I am going to close this ticket as a single item (user, group) should never have more than one set of uploaded avatars. Adding a filesystem check to get the time will potentially slow the function down on large sites. If you can point to a situation where avatars aren't being deleted on edit, with instructions on how to recreate, then that is a potentially a bug (or a server config issue) and the ticket can be reopened.

#4 @johnjamesjacoby
13 years ago

  • Milestone changed from Awaiting Review to 1.2.9

Moving closed ticket out of Awaiting Review.

Note: See TracTickets for help on using tickets.