Changeset 4294
- Timestamp:
- 04/25/2011 02:25:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
bp-messages/bp-messages-functions.php (modified) (1 diff)
-
bp-themes/bp-default/_inc/ajax.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-functions.php
r4164 r4294 58 58 // Loop the recipients and convert all usernames to user_ids where needed 59 59 foreach( (array) $recipients as $recipient ) { 60 if ( is_numeric( trim( $recipient ) ) ) 61 $recipient_ids[] = (int)trim( $recipient ); 62 63 if ( $recipient_id = bp_core_get_userid( trim( $recipient ) ) ) 64 $recipient_ids[] = (int)$recipient_id; 60 $recipient = trim( $recipient ); 61 if ( empty( $recipient ) ) 62 continue; 63 64 if ( is_numeric( $recipient ) ) { 65 if ( bp_core_get_core_userdata( (int) $recipient ) ) 66 $recipient_ids[] = (int) $recipient; 67 68 } else { 69 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ) 70 $recipient_id = bp_core_get_userid( $recipient ); 71 else 72 $recipient_id = bp_core_get_userid_from_nicename( $recipient ); 73 74 $recipient_ids[] = (int) $recipient_id; 75 } 65 76 } 66 77 -
trunk/bp-themes/bp-default/_inc/ajax.php
r4255 r4294 642 642 } 643 643 644 645 644 if ( !empty( $user_ids ) ) { 646 645 foreach ( $user_ids as $user_id ) { 647 $ud = get_userdata($user_id); 648 $username = $ud->user_login; 646 $ud = get_userdata( $user_id ); 647 if ( !$ud ) 648 continue; 649 650 if ( defined( 'BP_ENABLE_USERNAME_COMPATIBILITY_MODE' ) ) 651 $username = $ud->user_login; 652 else 653 $username = $ud->user_nicename; 654 649 655 echo '<span id="link-' . $username . '" value="' . bp_core_get_user_domain( $user_id ) . '"></span>' . bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'thumb', 'width' => 15, 'height' => 15 ) ) . ' ' . bp_core_get_user_displayname( $user_id ) . ' (' . $username . ') 650 656 ';
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)