Index: bp-core/bp-core-avatars.php
===================================================================
--- bp-core/bp-core-avatars.php
+++ bp-core/bp-core-avatars.php
@@ -36,11 +36,6 @@ function bp_core_set_avatar_constants() {
 		}
 	}
 
-	if ( !defined( 'BP_AVATAR_DEFAULT' ) )
-		define( 'BP_AVATAR_DEFAULT', BP_PLUGIN_URL . 'bp-core/images/mystery-man.jpg' );
-
-	if ( !defined( 'BP_AVATAR_DEFAULT_THUMB' ) )
-		define( 'BP_AVATAR_DEFAULT_THUMB', BP_PLUGIN_URL . 'bp-core/images/mystery-man-50.jpg' );
 }
 add_action( 'bp_init', 'bp_core_set_avatar_constants', 3 );
 
@@ -62,12 +57,12 @@ function bp_core_set_avatar_globals() {
 	$bp->avatar->original_max_filesize = BP_AVATAR_ORIGINAL_MAX_FILESIZE;
 
 	// Defaults
-	$bp->avatar->thumb->default = BP_AVATAR_DEFAULT_THUMB;
-	$bp->avatar->full->default 	= BP_AVATAR_DEFAULT;
+	$bp->avatar->thumb->default        = bp_core_avatar_default_thumb();
+	$bp->avatar->full->default 	   = bp_core_avatar_default();
 
 	// These have to be set on page load in order to avoid infinite filter loops at runtime
-	$bp->avatar->upload_path = bp_core_avatar_upload_path();
-	$bp->avatar->url	   	 = bp_core_avatar_url();
+	$bp->avatar->upload_path           = bp_core_avatar_upload_path();
+	$bp->avatar->url	   	   = bp_core_avatar_url();
 
 	// Backpat for pre-1.5
 	if ( ! defined( 'BP_AVATAR_UPLOAD_PATH' ) )
@@ -341,7 +336,7 @@ function bp_core_fetch_avatar( $args = '' ) {
 		if ( empty( $bp->grav_default->{$object} ) ) {
 			$default_grav = 'wavatar';
 		} else if ( 'mystery' == $bp->grav_default->{$object} ) {
-			$default_grav = apply_filters( 'bp_core_mysteryman_src', bp_core_avatar_default(), $grav_size );
+			$default_grav = apply_filters( 'bp_core_mysteryman_src', 'mm', $grav_size );
 		} else {
 			$default_grav = $bp->grav_default->{$object};
 		}
@@ -372,7 +367,7 @@ function bp_core_fetch_avatar( $args = '' ) {
 
 	// No avatar was found, and we've been told not to use a gravatar.
 	} else {
-		$gravatar = apply_filters( "bp_core_default_avatar_$object", BP_PLUGIN_URL . 'bp-core/images/mystery-man.jpg', $params );
+		$gravatar = apply_filters( "bp_core_default_avatar_$object", bp_core_avatar_default(), $params );
 	}
 
 	if ( true === $html )
@@ -933,7 +928,10 @@ function bp_core_avatar_original_max_filesize() {
 }
 
 /**
- * Get the default avatar
+ * Get the default avatar.
+ *
+ * Uses Gravatar's 'mystery-man' avatar.
+ * This is used if BP_AVATAR_DEFAULT is not defined.
  *
  * @package BuddyPress
  * @since BuddyPress (1.5)
@@ -941,13 +939,31 @@ function bp_core_avatar_original_max_filesize() {
  * @return int The URL of the default avatar
  */
 function bp_core_avatar_default() {
-	global $bp;
+	// check for our define first
+	if ( defined( 'BP_AVATAR_DEFAULT' ) ) {
+		$avatar = BP_AVATAR_DEFAULT;
 
-	return apply_filters( 'bp_core_avatar_default', $bp->avatar->full->default );
+	// if no define, fallback to Gravatar's mystery man
+	} else {
+		if ( is_ssl() ) {
+			$host = 'http://secure.gravatar.com/';
+		} else {
+			$host = 'http://www.gravatar.com/';
+		}
+	
+		// defaults to Gravatar's mystery man
+		$avatar = $host . 'avatar/00000000000000000000000000000000?d=mm&amp;s=' . bp_core_avatar_full_width();
+	}
+
+	// don't like this? use this hook to override
+	return apply_filters( 'bp_core_avatar_default', $avatar );
 }
 
 /**
- * Get the default avatar thumb
+ * Get the default avatar thumb.
+ *
+ * Uses Gravatar's 'mystery-man' avatar.
+ * This is used if BP_AVATAR_DEFAULT_THUMB is not defined.
  *
  * @package BuddyPress
  * @since BuddyPress (1.5)
@@ -955,7 +971,42 @@ function bp_core_avatar_default() {
  * @return int The URL of the default avatar thumb
  */
 function bp_core_avatar_default_thumb() {
-	global $bp;
+	// check for our define first
+	if ( defined( 'BP_AVATAR_DEFAULT_THUMB' ) ) {
+		$avatar = BP_AVATAR_DEFAULT_THUMB;
+
+	// if no define, fallback to Gravatar's mystery man
+	} else {
+		if ( is_ssl() ) {
+			$host = 'http://secure.gravatar.com/';
+		} else {
+			$host = 'http://www.gravatar.com/';
+		}
+	
+		$avatar = $host . 'avatar/00000000000000000000000000000000?d=mm&amp;s=' . bp_core_avatar_thumb_width();
+	}
+
+	// don't like this? use this hook to override
+	return apply_filters( 'bp_core_avatar_thumb', $avatar );
+}
+
+/**
+ * If BP_AVATAR_DEFAULT was defined, use it as the Gravatar default.
+ *
+ * In BuddyPress 1.7, due to changes to the default value of the 
+ * 'bp_core_mysteryman_src' hook to 'mm', we need to be considerate to those
+ * that may have set a custom default avatar via BP_AVATAR_DEFAULT.
+ *
+ * @since BuddyPress (1.7)
+ */
+function bp_core_avatar_mysteryman_src_backpat( $avatar ) {
+	$default_avatar = bp_core_avatar_default();
+
+	// check to see if bp_core_avatar_default() is not using gravatar
+	// if so, return our custom default avatar
+	if ( strpos( $default_avatar, 'gravatar' ) === false )
+		return $default_avatar;
 
-	return apply_filters( 'bp_core_avatar_thumb', $bp->avatar->thumb->default );
+	return $avatar;
 }
+add_filter( 'bp_core_mysteryman_src', 'bp_core_avatar_mysteryman_src_backpat' );
