diff --git a/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php index 527ca8c..539ab72 100644 --- a/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php +++ b/wp-content/plugins/bp-dedication/includes/bp-dedication-notifications.php @@ -4,11 +4,13 @@ function bp_dedication_send_dedication_notification( $post_id, $to_user_email, $ global $bp; /* Let's grab both user's names to use in the email. */ - $sender_name = bp_core_get_user_displayname( $from_user_id, false ); + $sender_ud = get_userdata( $from_user_id ); + + + $sender_username = $sender_ud->user_login; + $sender_name = bp_core_get_user_displayname( $sender_username ); //$reciever_name = bp_core_get_user_displayname( $to_user_id, false ); - /* Get the userdata for the sender. */ - //$sender_ud = get_userdata( $from_user_id ); /* Now we need to construct the URL's that we are going to use in the email */ //$sender_profile_link = bp_core_get_userlink($from_user_id, false, true); @@ -22,12 +24,12 @@ function bp_dedication_send_dedication_notification( $post_id, $to_user_email, $ $subject = '[' . get_blog_option( 1, 'blogname' ) . '] ' . sprintf( __( '%s dedicated a song 2 u!', 'bp-dedication' ), stripslashes($sender_name) ); $message = sprintf( __( -'%s sent you a dedication! +'%s (%s) sent you a dedication! To see %s\'s dedication: %s --------------------- -', 'bp-dedication' ), $sender_name, $sender_name, $post_link ); +', 'bp-dedication' ), $sender_name, $sender_username, $sender_username, $post_link ); //$message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'bp-example' ), $reciever_settings_link );