Index: bp-core-functions.php
===================================================================
--- bp-core-functions.php	(revision 5976)
+++ bp-core-functions.php	(working copy)
@@ -1122,5 +1122,26 @@
 	if ( 'remove_canonical_direct' == $redirect )
 		remove_action( 'template_redirect', 'redirect_canonical' );
 }
-
+ /**
+ * Retrieve full permalink for currently displayed buddypress page.
+ *
+ * Todo: if we are on a subpage (eg. /profile) we need to get the rest of slug.
+ * @since Trunk 1.6
+ *
+ * @return $permalink Current page url
+*/
+function bp_get_permalink() {
+	if ( !bp_is_blog_page() && bp_displayed_user_id() && !is_404() ) {
+		$permalink = bp_displayed_user_domain();
+	}
+			
+	if ( !bp_is_blog_page() && bp_is_groups_component() && bp_is_single_item() ) {
+		$permalink = trailingslashit( get_site_url() ) . trailingslashit( bp_get_groups_slug() ) . trailingslashit( bp_get_current_group_slug() );
+	}
+	
+	if ( bp_is_blog_page() ) { //This must be a WordPress page. Let them handle it.
+		$permalink = get_permalink();
+	}
+        return apply_filters('bp_get_permalink', $permalink);
+}
 ?>
