[buddypress-trac] [BuddyPress] #4975: Add $user_nicename to bp_core_get_userid_from_nicename filter

buddypress-trac noreply at wordpress.org
Thu May 2 17:04:59 UTC 2013


#4975: Add $user_nicename to bp_core_get_userid_from_nicename filter
-------------------------+-----------------------------
 Reporter:  megainfo     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:  1.7
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 For more compatibility, i suggest add $user_nicename to the filter

 Actual Code of function bp_core_get_userid_from_nicename

 {{{
 function bp_core_get_userid_from_nicename( $user_nicename ) {
         global $wpdb;

         if ( empty( $user_nicename ) )
                 return false;

         return apply_filters( 'bp_core_get_userid_from_nicename',
 $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE
 user_nicename = %s", $user_nicename ) ) );
 }
 }}}


 To,


 {{{

 function bp_core_get_userid_from_nicename( $user_nicename ) {
         global $wpdb;

         if ( empty( $user_nicename ) )
                 return false;

         return apply_filters( 'bp_core_get_userid_from_nicename',
 $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->users} WHERE
 user_nicename = %s", $user_nicename ) ), $user_nicename );
 }
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4975>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list