bp_core_get_username

  • apply_filters( 'bp_core_get_username', $username )

    Source Reference:

    • Component: BuddyPress :: bp-members
      File: /bp-members/bp-members-functions.php :: Trac Source Line: 264
      	// Check $username for empty spaces and default to nicename if found
      	if ( strstr( $username, ' ' ) )
      		$username = bp_members_get_user_nicename( $user_id );
      
      	// Add this to cache
      	if ( ( true == $update_cache ) && !empty( $username ) )
      		wp_cache_set( 'bp_user_username_' . $user_id, $username, 'bp' );
      
      	return apply_filters( 'bp_core_get_username', $username );
      }
      
      /**
       * Returns the user_nicename for a user based on their user_id. This should be
       * used for linking to user profiles and anywhere else a sanitized and unique
       * slug to a user is needed.
       *
       * @since BuddyPress (1.5)
       *
       * @package BuddyPress Core
      

Comments are closed.