Skip to:
Content

BuddyPress.org

Changeset 6052


Ignore:
Timestamp:
05/31/2012 11:10:13 PM (12 years ago)
Author:
boonebgorges
Message:

Show 'Deleted User' throughout messages component when user has been deleted.

Fixes #4227

Location:
trunk/bp-messages
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-classes.php

    r6044 r6052  
    263263        $recipient_links = array();
    264264
    265         foreach ( (array) $recipients as $recipient )
    266             $recipient_links[] = bp_core_get_userlink( $recipient->user_id );
     265        foreach ( (array) $recipients as $recipient ) {
     266            $recipient_link = bp_core_get_userlink( $recipient->user_id );
     267
     268            if ( empty( $recipient_link ) ) {
     269                $recipient_link = __( 'Deleted User', 'buddypress' );
     270            }
     271
     272            $recipient_links[] = $recipient_link;
     273        }
    267274
    268275        return implode( ', ', (array) $recipient_links );
  • trunk/bp-messages/bp-messages-template.php

    r6044 r6052  
    841841
    842842        foreach( (array) $thread_template->thread->recipients as $recipient ) {
    843             if ( (int) $recipient->user_id !== bp_loggedin_user_id() )
    844                 $recipient_links[] = bp_core_get_userlink( $recipient->user_id );
     843            if ( (int) $recipient->user_id !== bp_loggedin_user_id() ) {
     844                $recipient_link = bp_core_get_userlink( $recipient->user_id );
     845
     846                if ( empty( $recipient_link ) ) {
     847                    $recipient_link = __( 'Deleted User', 'buddypress' );
     848                }
     849
     850                $recipient_links[] = $recipient_link;
     851            }
    845852        }
    846853
Note: See TracChangeset for help on using the changeset viewer.