bp_core_get_userid

  • apply_filters( 'bp_core_get_userid', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users WHERE user_login = %s", $username ) ) )

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-functions.php :: Trac Source Line: 174
       * @return false on no match
       * @return int the user ID of the matched user.
       */
      function bp_core_get_userid( $username ) {
      	global $wpdb;
      
      	if ( empty( $username ) )
      		return false;
      
      	return apply_filters( 'bp_core_get_userid', $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users WHERE user_login = %s", $username ) ) );
      }
      
      /**
       * Returns the user_id for a user based on their user_nicename.
       *
       * @package BuddyPress Core
       * @param $username str Username to check.
       * @global $wpdb WordPress DB access object.
       * @return false on no match
       * @return int the user ID of the matched user.
      

Comments are closed.