Changeset 7462 for trunk/bp-messages/bp-messages-functions.php
- Timestamp:
- 10/23/2013 07:22:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-functions.php
r7228 r7462 75 75 $recipient_id = false; 76 76 77 // input was numeric 78 if ( is_numeric( $recipient ) ) { 79 // do a check against the user ID column first 80 if ( bp_core_get_core_userdata( (int) $recipient ) ) 77 // check user_login / nicename columns first 78 // @see http://buddypress.trac.wordpress.org/ticket/5151 79 if ( bp_is_username_compatibility_mode() ) { 80 $recipient_id = bp_core_get_userid( $recipient ); 81 } else { 82 $recipient_id = bp_core_get_userid_from_nicename( $recipient ); 83 } 84 85 // check against user ID column if no match and if passed recipient is numeric 86 if ( ! $recipient_id && is_numeric( $recipient ) ) { 87 if ( bp_core_get_core_userdata( (int) $recipient ) ) { 81 88 $recipient_id = (int) $recipient; 82 83 // if that fails, check against the user_login / user_nicename column84 else {85 if ( bp_is_username_compatibility_mode() )86 $recipient_id = bp_core_get_userid( (int) $recipient );87 else88 $recipient_id = bp_core_get_userid_from_nicename( (int) $recipient );89 89 } 90 90 } 91 92 if ( ! $recipient_id ) { 93 $invalid_recipients[] = $recipient; 91 94 } else { 92 if ( bp_is_username_compatibility_mode() )93 $recipient_id = bp_core_get_userid( $recipient );94 else95 $recipient_id = bp_core_get_userid_from_nicename( $recipient );96 }97 98 if ( !$recipient_id )99 $invalid_recipients[] = $recipient;100 else101 95 $recipient_ids[] = (int) $recipient_id; 96 } 102 97 } 103 98
Note: See TracChangeset
for help on using the changeset viewer.