Index: bp-members/bp-members-functions.php
--- bp-members/bp-members-functions.php
+++ bp-members/bp-members-functions.php
@@ -563,9 +563,15 @@
 	remove_action( 'make_spam_user', 'bp_core_mark_user_spam_admin' );
 	remove_action( 'make_ham_user',  'bp_core_mark_user_ham_admin'  );
 
-	// When marking as spam in the Dashboard, these actions are handled by WordPress
-	if ( !is_admin() ) {
+	// Determine if we are in an admin page
+	$is_admin = is_admin();
+	if( $is_admin && ! defined( 'DOING_AJAX' ) && bp_is_active( 'xprofile' ) ) {
+		$is_admin = (bool) ( buddypress()->admin->xprofile->user_page !== get_current_screen()->id );
+	}
 
+ 	// When marking as spam in the Dashboard, these actions are handled by WordPress
+	if ( ! $is_admin ) {
+
 		// Get the blogs for the user
 		$blogs = get_blogs_of_user( $user_id, true );
 
Index: bp-xprofile/admin/css/admin.css
--- bp-xprofile/admin/css/admin.css
+++ bp-xprofile/admin/css/admin.css
@@ -247,3 +247,88 @@
 	width: 100%;
 }
 
+/**** User Profile Administration Screens ****/
+
+div#profile-page.wrap form#your-profile {
+	position:relative;
+}
+
+div#profile-page.wrap form#your-profile h3:first-of-type {
+	margin-top:6em;
+}
+
+div#profile-page.wrap form#your-profile ul#profile-nav {
+	position:absolute;
+	top:-6em;
+	border-bottom:solid 1px #ccc;
+	width:100%;
+}
+
+div#community-profile-page h2:first-of-type {
+	margin-bottom:1em;
+}
+
+div#community-profile-page  h2.profile-section {
+	border-bottom:dotted 1px #ccc;
+}
+
+div#community-profile-page ul#profile-nav {
+	border-bottom:solid 1px #ccc;
+	width:100%;
+	margin-top:1em;
+	margin-bottom:1em;
+	padding:1em 0;
+	padding-bottom: 0;
+	height:2.4em;
+}
+
+form#your-profile ul#profile-nav li,
+div#community-profile-page ul#profile-nav li {
+	margin-left:0.4em;
+	float:left;
+	font-weight: bold;
+	font-size: 15px;
+	line-height: 24px;
+}
+
+form#your-profile ul#profile-nav li a,
+div#community-profile-page ul#profile-nav li a {
+	text-decoration: none;
+	color:#888;
+}
+
+form#your-profile ul#profile-nav li a:hover,
+form#your-profile ul#profile-nav li.nav-tab-active a,
+div#community-profile-page ul#profile-nav li a:hover,
+div#community-profile-page ul#profile-nav li.nav-tab-active a {
+	text-decoration: none;
+	color:#000;
+}
+
+div#community-profile-page div.dashicons-last-active:before {
+	content: "\f130";
+}
+
+div#community-profile-page div.dashicons-friends:before {
+	content: "\f454";
+}
+
+div#community-profile-page div.dashicons-groups:before {
+	content: "\f456";
+}
+
+div#community-profile-page div.dashicons-blogs:before {
+	content: "\f120";
+}
+
+div#community-profile-page div#bp_xprofile_user_admin_avatar div.avatar {
+	width:150px;
+	margin:0 auto;
+}
+
+div#community-profile-page div#bp_xprofile_user_admin_avatar a {
+	display:block;
+	margin:1em 0;
+	text-decoration:none;
+	color:#888;
+}
Index: bp-xprofile/admin/css/admin.min.css
--- bp-xprofile/admin/css/admin.min.css
+++ bp-xprofile/admin/css/admin.min.css
@@ -1 +1 @@
-#tabs-bottom{background:#f9f9f9;height:32px;border:1px solid #dfdfdf;border-radius:0 0 3px 3px}#tabs{position:relative}p.nofields{margin-top:20px}ul#field-group-tabs{float:left;padding:0 0 0 15px;margin:0;display:none}ul#field-group-tabs li{float:left;margin-bottom:-1px;background-color:transparent;margin-right:8px}ul#field-group-tabs li.ui-state-hover a{background-color:#fafafa}ul#field-group-tabs li.ui-state-hover a.ui-tab{border-color:#dfdfdf #dfdfdf #f9f9f9 #dfdfdf;color:#d54e21}ul#field-group-tabs li.ui-state-acceptable a.ui-tab{border-color:#5a5 #5a5 #ccc #5a5;color:#8a8;background-color:#efe}ul#field-group-tabs li.ui-state-active.ui-state-acceptable a.ui-tab{background-color:#f9f9f9}ul#field-group-tabs li.drop-candidate a.ui-tab{background-color:#ffc;border-color:#aa5 #aa5 #ccc #aa5;color:#aa8}ul#field-group-tabs li a.ui-tab{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;display:block;margin-top:3px;padding:5px 10px 5px;border:1px solid #dfdfdf;border-bottom:0;border-radius:3px 3px 0 0;text-decoration:none;color:#aaa}ul#field-group-tabs li.ui-state-active a.ui-tab{background-color:#f9f9f9;margin-top:-1px;padding:7px 10px 7px;border:1px solid #dfdfdf;border-bottom:1px solid transparent;color:#000}.tab-toolbar{background:#f9f9f9;border-width:1px 1px 0;border-radius:3px 3px 0 0;margin:-20px -21px 20px -21px;clear:left;padding:10px;border:1px solid #dfdfdf}.field-wrapper a.deletion,.tab-toolbar a.deletion{color:#f00;border-bottom:1px solid #f00;font-size:12px;text-decoration:none;padding:0;margin:-2px 0 0 5px}div.tab-toolbar a.button-primary{color:#fff!important}div.tab-wrapper{background-color:#fff;clear:left;padding:20px;border-left:1px solid #ccc;border-right:1px solid #ccc;border-radius:3px 3px 0 0}.tab-wrapper fieldset{position:relative;cursor:default!important;background:inherit}.tab-wrapper fieldset legend{padding-bottom:15px;font-weight:bold}.tab-wrapper .xprofile-field{position:relative}.tab-wrapper fieldset fieldset{position:relative;border:1px solid #ddd;border-radius:3px;margin:10px 0 0 0;cursor:move!important;background:#f9f9f9}.tab-wrapper fieldset fieldset legend{position:absolute!important;top:0;left:0;width:80%;padding:30px}.tab-wrapper fieldset fieldset legend span{position:absolute;top:6px;left:10px;font-weight:bold;width:100%}.field-group fieldset:hover{background-color:#fafafa;border-color:#ccc}fieldset div.field-wrapper{padding:40px 10px 10px}fieldset.radio div div label,fieldset.checkbox div label{margin-right:20px}fieldset.clear-value{margin-left:10px}.field-group div.actions{float:none;border-top:1px solid #ddd;margin:20px 0 0;padding-top:10px}.field-group div.actions a,.field-group div.actions button,.field-group div.actions input{float:none}.field-group fieldset:hover div.actions{display:block}.field-group fieldset.ui-sortable-placeholder{border:1px dashed #999;background-color:#eee;visibility:visible!important}ul.forTab{list-style:none;padding:0;margin:0 0 0 1em}ul.forTab li{margin:0 0 1em 0}ul.forTab li label{display:block}ul.forTab li input{font-size:1.4em}p.success{background:green}p.err{border-top:2px solid red;border-bottom:2px solid red;color:red;padding:5px 0;width:40%}span.desc,span.signup-description{display:block;font-size:11px;color:#555}select.multi-select{width:90%;height:10em!important}ul.multi-checkbox{margin:0 5px 0 0;padding:.5em .9em;height:10em;overflow:auto;list-style:none;border:solid 1px #ccc;width:90%}ul.multi-checkbox li{padding:0;margin:0}div.options-box{margin-left:20px!important;margin-right:10px!important;border-left:4px solid #eaf3fa;padding-left:15px}th a{background:#fff;padding:2px 5px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;top:-2px}textarea#description,textarea#group_description{border:1px solid #ddd;width:100%}
\ No newline at end of file
+#tabs-bottom{background:#f9f9f9;height:32px;border:1px solid #dfdfdf;border-radius:0 0 3px 3px}#tabs{position:relative}p.nofields{margin-top:20px}ul#field-group-tabs{float:left;padding:0 0 0 15px;margin:0;display:none}ul#field-group-tabs li{float:left;margin-bottom:-1px;background-color:transparent;margin-right:8px}ul#field-group-tabs li.ui-state-hover a{background-color:#fafafa}ul#field-group-tabs li.ui-state-hover a.ui-tab{border-color:#dfdfdf #dfdfdf #f9f9f9;color:#d54e21}ul#field-group-tabs li.ui-state-acceptable a.ui-tab{border-color:#5a5 #5a5 #ccc;color:#8a8;background-color:#efe}ul#field-group-tabs li.ui-state-active.ui-state-acceptable a.ui-tab{background-color:#f9f9f9}ul#field-group-tabs li.drop-candidate a.ui-tab{background-color:#ffc;border-color:#aa5 #aa5 #ccc;color:#aa8}ul#field-group-tabs li a.ui-tab{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;font-size:14px;display:block;margin-top:3px;padding:5px 10px;border:1px solid #dfdfdf;border-bottom:0;border-radius:3px 3px 0 0;text-decoration:none;color:#aaa}ul#field-group-tabs li.ui-state-active a.ui-tab{background-color:#f9f9f9;margin-top:-1px;padding:7px 10px;border:1px solid #dfdfdf;border-bottom:1px solid transparent;color:#000}.tab-toolbar{background:#f9f9f9;border-radius:3px 3px 0 0;margin:-20px -21px 20px -21px;clear:left;padding:10px;border:1px solid #dfdfdf}.field-wrapper a.deletion,.tab-toolbar a.deletion{color:red;border-bottom:1px solid red;font-size:12px;text-decoration:none;padding:0;margin:-2px 0 0 5px}div.tab-toolbar a.button-primary{color:#fff!important}div.tab-wrapper{background-color:#fff;clear:left;padding:20px;border-left:1px solid #ccc;border-right:1px solid #ccc;border-radius:3px 3px 0 0}.tab-wrapper fieldset{position:relative;cursor:default!important;background:inherit}.tab-wrapper fieldset legend{padding-bottom:15px;font-weight:700}.tab-wrapper .xprofile-field{position:relative}.tab-wrapper fieldset fieldset{position:relative;border:1px solid #ddd;border-radius:3px;margin:10px 0 0;cursor:move!important;background:#f9f9f9}.tab-wrapper fieldset fieldset legend{position:absolute!important;top:0;left:0;width:80%;padding:30px}.tab-wrapper fieldset fieldset legend span{position:absolute;top:6px;left:10px;font-weight:700;width:100%}.field-group fieldset:hover{background-color:#fafafa;border-color:#ccc}fieldset div.field-wrapper{padding:40px 10px 10px}fieldset.checkbox div label,fieldset.radio div div label{margin-right:20px}fieldset.clear-value{margin-left:10px}.field-group div.actions{float:none;border-top:1px solid #ddd;margin:20px 0 0;padding-top:10px}.field-group div.actions a,.field-group div.actions button,.field-group div.actions input{float:none}.field-group fieldset:hover div.actions{display:block}.field-group fieldset.ui-sortable-placeholder{border:1px dashed #999;background-color:#eee;visibility:visible!important}ul.forTab{list-style:none;padding:0;margin:0 0 0 1em}ul.forTab li{margin:0 0 1em}ul.forTab li label{display:block}ul.forTab li input{font-size:1.4em}p.success{background:green}p.err{border-top:2px solid red;border-bottom:2px solid red;color:red;padding:5px 0;width:40%}span.desc,span.signup-description{display:block;font-size:11px;color:#555}select.multi-select{width:90%;height:10em!important}ul.multi-checkbox{margin:0 5px 0 0;padding:.5em .9em;height:10em;overflow:auto;list-style:none;border:solid 1px #ccc;width:90%}ul.multi-checkbox li{padding:0;margin:0}div.options-box{margin-left:20px!important;margin-right:10px!important;border-left:4px solid #EAF3FA;padding-left:15px}th a{background:#fff;padding:2px 5px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;top:-2px}textarea#description,textarea#group_description{border:1px solid #ddd;width:100%}div#profile-page.wrap form#your-profile{position:relative}div#profile-page.wrap form#your-profile h3:first-of-type{margin-top:6em}div#profile-page.wrap form#your-profile ul#profile-nav{position:absolute;top:-6em;border-bottom:solid 1px #ccc;width:100%}div#community-profile-page h2:first-of-type{margin-bottom:1em}div#community-profile-page h2.profile-section{border-bottom:dotted 1px #ccc}div#community-profile-page ul#profile-nav{border-bottom:solid 1px #ccc;width:100%;margin-top:1em;margin-bottom:1em;padding:1em 0;padding-bottom:0;height:2.4em}div#community-profile-page ul#profile-nav li,form#your-profile ul#profile-nav li{margin-left:.4em;float:left;font-weight:700;font-size:15px;line-height:24px}div#community-profile-page ul#profile-nav li a,form#your-profile ul#profile-nav li a{text-decoration:none;color:#888}div#community-profile-page ul#profile-nav li a:hover,div#community-profile-page ul#profile-nav li.nav-tab-active a,form#your-profile ul#profile-nav li a:hover,form#your-profile ul#profile-nav li.nav-tab-active a{text-decoration:none;color:#000}div#community-profile-page div.dashicons-last-active:before{content:"\f130"}div#community-profile-page div.dashicons-friends:before{content:"\f454"}div#community-profile-page div.dashicons-groups:before{content:"\f456"}div#community-profile-page div.dashicons-blogs:before{content:"\f120"}div#community-profile-page div#bp_xprofile_user_admin_avatar div.avatar{width:150px;margin:0 auto}div#community-profile-page div#bp_xprofile_user_admin_avatar a{display:block;margin:1em 0;text-decoration:none;color:#888}
\ No newline at end of file
Index: bp-xprofile/bp-xprofile-admin.php
--- bp-xprofile/bp-xprofile-admin.php
+++ bp-xprofile/bp-xprofile-admin.php
@@ -466,3 +466,959 @@
 
 <?php
 }
+
+if ( !class_exists( 'BP_XProfile_User_Admin' ) ) :
+/**
+ * Load xProfile user's profile admin area.
+ *
+ * @package BuddyPress
+ * @subpackage xProfileAdministration
+ *
+ * @since BuddyPress (?)
+ */
+class BP_XProfile_User_Admin {
+
+	/**
+	 * screen id for edit user's profile page.
+	 *
+	 * @access public
+	 * @var string
+	 */
+	public $user_page = '';
+
+	/**
+	 * Constructor method.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 */
+	public function __construct() {
+		$this->setup_globals();
+		$this->setup_actions();
+	}
+
+	/**
+	 * Set admin-related globals.
+	 *
+	 * @access private
+	 * @since BuddyPress (?)
+	 */
+	private function setup_globals() {
+		$bp = buddypress();
+
+		// Paths and URLs
+		$this->admin_dir  = trailingslashit( $bp->plugin_dir  . 'bp-xprofile/admin' ); // Admin path
+		$this->admin_url  = trailingslashit( $bp->plugin_url  . 'bp-xprofile/admin' ); // Admin url
+		$this->css_url    = trailingslashit( $this->admin_url . 'css'           ); // Admin css URL
+		$this->js_url     = trailingslashit( $this->admin_url . 'js'            ); // Admin css URL
+
+		// Main settings page
+		$this->settings_page = bp_core_do_network_admin() ? 'settings.php' : 'options-general.php';
+
+		// The Edit Profile Screen id
+		$this->user_page = '';
+
+		// The screen ids to load specific css for
+		$this->screen_id = array();
+
+		// The WordPress edit user url
+		$this->edit_url = bp_get_admin_url( 'user-edit.php' );
+
+		// BuddyPress edit user's profile url
+		$this->edit_profile_url = add_query_arg( 'page', 'bp-profile-edit', bp_get_admin_url( 'users.php' ) );
+	}
+
+	/**
+	 * Set admin-related actions and filters.
+	 *
+	 * @access private
+	 * @since BuddyPress (?)
+	 *
+	 * @uses add_action() To add various actions.
+	 * @uses add_filter() To add various filters.
+	 */
+	private function setup_actions() {
+
+		/** Actions ***********************************************************/
+
+		// Add some page specific output to the <head>
+		add_action( 'bp_admin_head',            array( $this, 'admin_head'      ), 999    );
+
+		// Add menu item to all users menu
+		add_action( bp_core_admin_hook(),       array( $this, 'admin_menus'     ),   5    );
+
+		// Enqueue all admin JS and CSS
+		add_action( 'bp_admin_enqueue_scripts', array( $this, 'enqueue_scripts' )         );
+
+		// Create the Profile Navigation (WordPress/Community)
+		add_action( 'edit_user_profile',        array( $this, 'profile_nav'     ),  99, 1 );
+
+
+		/** Filters ***********************************************************/
+
+		// Add a row action to users listing
+		add_filter( bp_core_do_network_admin() ? 'ms_user_row_actions' : 'user_row_actions', array( $this, 'row_actions' ), 10, 2 );
+
+	}
+
+	/**
+	 * Create the All users Edit Profile submenu
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @uses add_users_page() To add the Edit Profile page in Users section.
+	 */
+	public function admin_menus() {
+
+		// Manage user's profile
+		$hook = $this->user_page = add_users_page(
+			__( 'Edit Profile',  'buddypress' ),
+			__( 'Edit Profile',  'buddypress' ),
+			'bp_moderate',
+			'bp-profile-edit',
+			array( &$this, 'user_admin' )
+		);
+
+		$edit_page = 'user-edit';
+
+		if ( bp_core_do_network_admin() ) {
+			$edit_page       .= '-network';
+			$this->user_page .= '-network';
+		}
+
+		$this->screen_id = array( $edit_page, $this->user_page );
+
+		add_action( "admin_head-$hook", array( $this, 'modify_admin_menu_highlight' ) );
+		add_action( "load-$hook",       array( $this, 'user_admin_load' ) );
+
+	}
+
+	/**
+	 * Add some specific styling to the Edit user and Edit user's profile page.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 */
+	public function enqueue_scripts() {
+		if ( ! in_array( get_current_screen()->id, $this->screen_id ) ) {
+			return;
+		}
+
+		$min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
+
+		$file = $this->css_url . "admin{$min}.css";
+		$file = apply_filters( 'bp_xprofile_admin_css', $file );
+		wp_enqueue_style( 'bp-xprofile-css', $file, array(), bp_get_version() );
+
+		// Plugins may want to hook here to load some css/js
+		do_action( 'bp_xprofile_user_admin_enqueue_scripts', get_current_screen()->id, $this->screen_id );
+	}
+
+	/**
+	 * Create the Profile navigation in Edit User & Edit Profile pages
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 */
+	public function profile_nav( $user = null, $active = 'WordPress' ) {
+
+		if ( empty( $user->ID ) ) {
+			return;
+		}
+
+		$query_args = array( 'user_id' => $user->ID );
+
+		if ( ! empty( $_REQUEST['wp_http_referer'] ) ) {
+			$query_args['wp_http_referer'] = urlencode( wp_unslash( $_REQUEST['wp_http_referer'] ) );
+		}
+
+		$community_url = add_query_arg( $query_args, $this->edit_profile_url );
+		$wordpress_url = add_query_arg( $query_args, $this->edit_url );
+
+		$bp_active = false;
+		$wp_active = ' nav-tab-active';
+		if ( 'BuddyPress' == $active ) {
+			$bp_active = ' nav-tab-active';
+			$wp_active = false;
+		}
+
+		?>
+		<ul id="profile-nav" class="nav-tab-wrapper">
+			<li class="nav-tab<?php echo $wp_active;?>"><a href="<?php echo $wordpress_url;?>"><?php _e( 'WordPress Profile' ); ?></a></li>
+			<li class="nav-tab<?php echo $bp_active;?>"><a href="<?php echo $community_url;?>"><?php _e( 'Community Profile' ); ?></a></li>
+		</ul>
+		<?php
+	}
+
+	/**
+	 * Highlight the All users menu if on Edit Profile pages
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @global $plugin_page
+	 * @global $submenu_file
+	 */
+	public function modify_admin_menu_highlight() {
+		global $plugin_page, $submenu_file;
+
+		// Only Show the All users menu
+		if ( 'bp-profile-edit' ==  $plugin_page ) {
+			$submenu_file = 'users.php';
+		}
+	}
+
+	/**
+	 * Remove the Edit Profile submenu page
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 */
+	public function admin_head() {
+		// Remove submenu to force using Profile Navigation
+		remove_submenu_page( 'users.php', 'bp-profile-edit' );
+	}
+
+	/**
+	 * Set up the User's profile admin page.
+	 *
+	 * Loaded before the page is rendered, this function does all initial setup,
+	 * including: processing form requests, registering contextual help, and
+	 * setting up screen options.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 */
+	public function user_admin_load() {
+
+		if ( ! $user_id = intval( $_GET['user_id'] ) ) {
+			wp_die( __( 'No users were found', 'buddypress' ) );
+		}
+
+		$bp = buddypress();
+
+		/**
+		 * Sets displayed user id if empty on the user's profile admin page.
+		 * this is probably not the right way to do it. But bp_get_the_profile_field_options() args
+		 * does not accept a user_id parameter and for instance, bp_displayed_user_id() is used in
+		 * BP_XProfile_ProfileData::get_value_byid() to retrieve datas.
+		 */
+		if ( empty( $bp->displayed_user->id ) ) {
+
+			// Let's set the user displayed id
+			$bp->displayed_user->id       = $user_id;
+
+			// The domain for the user currently being displayed
+			$bp->displayed_user->domain   = bp_core_get_user_domain( bp_displayed_user_id() );
+
+			// The core userdata of the user who is currently being displayed
+			$bp->displayed_user->userdata = bp_core_get_core_userdata( bp_displayed_user_id() );
+
+			// Fetch the full name displayed user
+			$bp->displayed_user->fullname = bp_core_get_user_displayname( bp_displayed_user_id() );
+		}
+
+		// Build redirection URL
+		$redirect_to = remove_query_arg( array( 'action', 'error', 'updated', 'spam', 'ham', 'delete_avatar' ), $_SERVER['REQUEST_URI'] );
+		$doaction = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : false;
+
+		if ( ! empty( $_REQUEST['user_status'] ) ) {
+			$spam = ( 'spam' == $_REQUEST['user_status'] ) ? true : false ;
+
+			if ( $spam != bp_is_user_spammer( $user_id ) ) {
+				$doaction = $_REQUEST['user_status'];
+			}
+		}
+
+		// Call an action for plugins to hook in early
+		do_action_ref_array( 'bp_xprofile_user_admin_load', array( $doaction, $_REQUEST ) );
+
+		// Prepare the display of the Community Profile screen
+		if ( ! in_array( $doaction, array( 'update', 'delete_avatar', 'spam', 'ham' ) ) ) {
+			add_screen_option( 'layout_columns', array( 'default' => 2, 'max' => 2, ) );
+
+			get_current_screen()->add_help_tab( array(
+				'id'      => 'bp-profile-edit-overview',
+				'title'   => __( 'Overview', 'buddypress' ),
+				'content' =>
+				'<p>' . __( 'This is the admin view of a user&#39;s profile.', 'buddypress' ) . '</p>' .
+				'<p>' . __( 'You can edit the different fields of his extended profile from the main metabox', 'buddypress' ) . '</p>' .
+				'<p>' . __( 'You can get some interesting informations about him on right side metaboxes', 'buddypress' ) . '</p>'
+			) );
+
+			// Help panel - sidebar links
+			get_current_screen()->set_help_sidebar(
+				'<p><strong>' . __( 'For more information:', 'buddypress' ) . '</strong></p>' .
+				'<p>' . __( '<a href="http://codex.buddypress.org/buddypress-site-administration/managing-user-profiles/">Managing Profiles</a>', 'buddypress' ) . '</p>' .
+				'<p>' . __( '<a href="http://buddypress.org/support/">Support Forums</a>', 'buddypress' ) . '</p>'
+			);
+
+			// Register metaboxes for the edit screen.
+			add_meta_box( 'submitdiv', _x( 'Status', 'xprofile user-admin edit screen', 'buddypress' ), array( &$this, 'user_admin_status_metabox' ), get_current_screen()->id, 'side', 'core' );
+
+			// Each Group of fields will have his own metabox
+			if ( false == bp_is_user_spammer( $user_id ) && bp_has_profile( array( 'fetch_fields' => false ) ) ) {
+				while ( bp_profile_groups() ) : bp_the_profile_group();
+					add_meta_box( 'bp_xprofile_user_admin_fields_' . bp_get_the_profile_group_slug(), bp_get_the_profile_group_name(), array( &$this, 'user_admin_profile_metaboxes' ), get_current_screen()->id, 'normal', 'core', array( 'profile_group_id' => bp_get_the_profile_group_id() ) );
+				endwhile;
+
+			// if a user has been mark as a spammer, his BuddyPress datas are removed !
+			} else {
+				add_meta_box( 'bp_xprofile_user_admin_empty_profile', _x( 'User marked as a spammer', 'xprofile user-admin edit screen', 'buddypress' ), array( &$this, 'user_admin_spammer_metabox' ), get_current_screen()->id, 'normal', 'core' );
+			}
+
+			// Avatar Metabox
+			add_meta_box( 'bp_xprofile_user_admin_avatar',  _x( 'Avatar', 'xprofile user-admin edit screen', 'buddypress' ), array( &$this, 'user_admin_avatar_metabox' ), get_current_screen()->id, 'side', 'low' );
+
+			// User Stat metabox
+			add_meta_box( 'bp_xprofile_user_admin_stat',    _x( 'Stats', 'xprofile user-admin edit screen', 'buddypress' ), array( &$this, 'user_admin_stats_metabox' ), get_current_screen()->id, 'side', 'low' );
+
+			// Custom metabox ?
+			do_action( 'bp_xprofile_user_admin_metaboxes' );
+
+			// Enqueue javascripts
+			wp_enqueue_script( 'postbox' );
+			wp_enqueue_script( 'dashboard' );
+			wp_enqueue_script( 'comment' );
+
+		// Spam or Ham user
+		} else if ( in_array( $doaction, array( 'spam', 'ham' ) ) ) {
+
+			check_admin_referer( 'edit-bp-profile_' . $user_id );
+
+			if ( bp_core_process_spammer_status( $user_id, $doaction ) ) {
+				$redirect_to = add_query_arg( 'updated', $doaction, $redirect_to );
+			} else {
+				$redirect_to = add_query_arg( 'error', $doaction, $redirect_to );
+			}
+
+			bp_core_redirect( $redirect_to );
+
+		// Delete avatar
+		} else if ( 'delete_avatar' == $doaction ) {
+
+			check_admin_referer( 'delete_avatar' );
+
+			$redirect_to = remove_query_arg( '_wpnonce', $redirect_to );
+
+			if ( bp_core_delete_existing_avatar( array( 'item_id' => $user_id ) ) ) {
+				$redirect_to = add_query_arg( 'updated', 'avatar', $redirect_to );
+			} else {
+				$redirect_to = add_query_arg( 'error', 'avatar', $redirect_to );
+			}
+
+			bp_core_redirect( $redirect_to );
+
+		// Update fields
+		} else {
+
+			// Check to see if any new information has been submitted
+			if ( isset( $_POST['field_ids'] ) ) {
+
+				// Check the nonce
+				check_admin_referer( 'edit-bp-profile_' . $user_id );
+
+				// Check we have field ID's
+				if ( empty( $_POST['field_ids'] ) ) {
+					$redirect_to = add_query_arg( 'error', '1', $redirect_to );
+					bp_core_redirect( $redirect_to );
+				}
+
+				$merge_ids = '';
+				foreach ( $_POST['field_ids'] as $ids ) {
+					$merge_ids .= $ids . ',';
+				}
+
+				// Explode the posted field IDs into an array so we know which
+				// fields have been submitted
+				$posted_field_ids = array_filter( wp_parse_id_list( $merge_ids ) );
+				$is_required      = array();
+
+				// Loop through the posted fields formatting any datebox values
+				// then validate the field
+				foreach ( (array) $posted_field_ids as $field_id ) {
+					if ( !isset( $_POST['field_' . $field_id] ) ) {
+						if ( !empty( $_POST['field_' . $field_id . '_day'] ) && !empty( $_POST['field_' . $field_id . '_month'] ) && !empty( $_POST['field_' . $field_id . '_year'] ) ) {
+							// Concatenate the values
+							$date_value =   $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year'];
+
+							// Turn the concatenated value into a timestamp
+							$_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $date_value ) );
+						}
+					}
+
+					$is_required[$field_id] = xprofile_check_is_required_field( $field_id );
+					if ( $is_required[$field_id] && empty( $_POST['field_' . $field_id] ) ) {
+						$redirect_to = add_query_arg( 'error', '2', $redirect_to );
+						bp_core_redirect( $redirect_to );
+					}
+				}
+
+				// Set the errors var
+				$errors = false;
+
+				// Now we've checked for required fields, lets save the values.
+				foreach ( (array) $posted_field_ids as $field_id ) {
+
+					// Certain types of fields (checkboxes, multiselects) may come through empty. Save them as an empty array so that they don't get overwritten by the default on the next edit.
+					if ( empty( $_POST['field_' . $field_id] ) ) {
+						$value = array();
+					} else {
+						$value = $_POST['field_' . $field_id];
+					}
+
+					if ( !xprofile_set_field_data( $field_id, $user_id, $value, $is_required[$field_id] ) ) {
+						$errors = true;
+					} else {
+						do_action( 'xprofile_profile_field_data_updated', $field_id, $value );
+					}
+				}
+
+				do_action( 'xprofile_updated_profile', $user_id, $posted_field_ids, $errors );
+
+				// Set the feedback messages
+				if ( !empty( $errors ) ) {
+					$redirect_to = add_query_arg( 'error', '3', $redirect_to );
+				} else {
+					$redirect_to = add_query_arg( 'updated', '1', $redirect_to );
+				}
+
+				bp_core_redirect( $redirect_to );
+			}
+
+			do_action( 'xprofile_screen_edit_profile' );
+		}
+	}
+
+	/**
+	 * Display the user's profile.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 */
+	public function user_admin() {
+
+		if ( ! current_user_can( 'bp_moderate' ) ) {
+			die( '-1' );
+		}
+
+		$user = get_user_to_edit( $_GET['user_id'] );
+
+		// Construct URL for form
+		$form_url        = remove_query_arg( array( 'action', 'error', 'updated', 'spam', 'ham' ), $_SERVER['REQUEST_URI'] );
+		$form_url        = add_query_arg( 'action', 'update', $form_url );
+		$wp_http_referer = remove_query_arg( array( 'action', 'updated' ), $_REQUEST['wp_http_referer'] );
+
+		// Prepare notice for admin
+		$notice = array();
+
+		if ( ! empty( $_REQUEST['updated'] ) ) {
+			switch ( $_REQUEST['updated'] ) {
+			case 'avatar':
+				$notice = array(
+					'class'   => 'updated',
+					'message' => __( 'Avatar was deleted successfully!', 'buddypress' )
+				);
+				break;
+			case 'ham' :
+				$notice = array(
+					'class'   => 'updated',
+					'message' => __( 'User removed as spammer.', 'buddypress' )
+				);
+				break;
+			case 'spam' :
+				$notice = array(
+					'class'   => 'updated',
+					'message' => __( 'User marked as spammer. Spam users are visible only to site admins.', 'buddypress' )
+				);
+				break;
+			case 1 :
+				$notice = array(
+					'class'   => 'updated',
+					'message' => __( 'Profile updated.', 'buddypress' )
+				);
+				break;
+			}
+		}
+
+		if ( ! empty( $_REQUEST['error'] ) ) {
+			switch ( $_REQUEST['error'] ) {
+			case 'avatar':
+				$notice = array(
+					'class'   => 'error',
+					'message' => __( 'There was a problem deleting that avatar, please try again.', 'buddypress' )
+				);
+				break;
+			case 'ham' :
+				$notice = array(
+					'class'   => 'error',
+					'message' => __( 'User could not be removed as spammer.', 'buddypress' )
+				);
+				break;
+			case 'spam' :
+				$notice = array(
+					'class'   => 'error',
+					'message' => __( 'User could not be marked as spammer.', 'buddypress' )
+				);
+				break;
+			case 1 :
+				$notice = array(
+					'class'   => 'error',
+					'message' => __( 'An error occured while trying to update the profile.', 'buddypress' )
+				);
+				break;
+			case 2:
+				$notice = array(
+					'class'   => 'error',
+					'message' => __( 'Please make sure you fill in all required fields in this profile field group before saving.', 'buddypress' )
+				);
+				break;
+			case 3:
+				$notice = array(
+					'class'   => 'error',
+					'message' => __( 'There was a problem updating some of your profile information, please try again.', 'buddypress' )
+				);
+				break;
+			}
+		}
+
+		if ( ! empty( $notice ) ) :
+			if ( 'updated' === $notice['class'] ) : ?>
+				<div id="message" class="<?php echo esc_attr( $notice['class'] ); ?>">
+			<?php else: ?>
+				<div class="<?php echo esc_attr( $notice['class'] ); ?>">
+			<?php endif; ?>
+				<p><?php echo $notice['message']; ?></p>
+				<?php if ( !empty( $wp_http_referer ) && ( 'updated' === $notice['class'] ) ) : ?>
+					<p><a href="<?php echo esc_url( $wp_http_referer ); ?>"><?php _e( '&larr; Back to Users', 'buddypress' ); ?></a></p>
+				<?php endif; ?>
+			</div>
+		<?php endif; ?>
+
+		<div class="wrap"  id="community-profile-page">
+			<?php screen_icon( 'users' ); ?>
+			<h2>
+				<?php
+				_e( 'Edit User', 'buddypress' );
+				if ( current_user_can( 'create_users' ) ) { ?>
+					<a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'user', 'buddypress' ); ?></a>
+				<?php } elseif ( is_multisite() && current_user_can( 'promote_users' ) ) { ?>
+					<a href="user-new.php" class="add-new-h2"><?php echo esc_html_x( 'Add Existing', 'user', 'buddypress' ); ?></a>
+				<?php }
+				?>
+			</h2>
+
+			<?php if ( ! empty( $user ) ) :
+
+				$this->profile_nav( $user, 'BuddyPress' ); ?>
+
+				<form action="<?php echo esc_attr( $form_url ); ?>" id="your-profile" method="post">
+					<div id="poststuff">
+
+						<div id="post-body" class="metabox-holder columns-<?php echo 1 == get_current_screen()->get_columns() ? '1' : '2'; ?>">
+							<div id="post-body-content">
+							</div><!-- #post-body-content -->
+
+							<div id="postbox-container-1" class="postbox-container">
+								<?php do_meta_boxes( get_current_screen()->id, 'side', $user ); ?>
+							</div>
+
+							<div id="postbox-container-2" class="postbox-container">
+								<?php do_meta_boxes( get_current_screen()->id, 'normal',   $user ); ?>
+								<?php do_meta_boxes( get_current_screen()->id, 'advanced', $user ); ?>
+							</div>
+						</div><!-- #post-body -->
+
+					</div><!-- #poststuff -->
+
+					<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
+					<?php wp_nonce_field( 'meta-box-order',  'meta-box-order-nonce', false ); ?>
+					<?php wp_nonce_field( 'edit-bp-profile_' . $user->ID ); ?>
+
+				</form>
+
+			<?php else : ?>
+				<p><?php printf( __( 'No user found with this ID. <a href="%s">Go back and try again</a>.', 'buddypress' ), esc_url( bp_get_admin_url( 'users.php' ) ) ); ?></p>
+			<?php endif; ?>
+
+		</div><!-- .wrap -->
+		<?php
+	}
+
+	/**
+	 * Renders the Status metabox for user's profile screen.
+	 *
+	 * Actions are :
+	 * - Update profile fields
+	 * - Spam/Unspam user
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @param WP_User $user The WP_User object for the user's profile to edit
+	 */
+	public function user_admin_status_metabox( $user = null ) {
+
+		if ( empty( $user->ID ) ) {
+			return;
+		} ?>
+
+		<div class="submitbox" id="submitcomment">
+
+			<div id="minor-publishing">
+				<div id="minor-publishing-actions">
+					<div id="preview-action">
+						<a class="button preview" href="<?php echo esc_attr( bp_core_get_user_domain( $user->ID ) ); ?>" target="_blank"><?php _e( 'View Profile', 'buddypress' ); ?></a>
+					</div>
+
+					<div class="clear"></div>
+				</div><!-- #minor-publishing-actions -->
+
+				<div id="misc-publishing-actions">
+					<div class="misc-pub-section" id="comment-status-radio">
+						<label class="approved"><input type="radio" name="user_status" value="ham" <?php checked( bp_is_user_spammer( $user->ID ), false ); ?>><?php _e( 'Active', 'buddypress' ); ?></label><br />
+						<label class="spam"><input type="radio" name="user_status" value="spam" <?php checked( bp_is_user_spammer( $user->ID ), true ); ?>><?php _e( 'Spammer', 'buddypress' ); ?></label>
+					</div>
+
+					<div class="misc-pub-section curtime misc-pub-section-last">
+						<?php
+						// translators: Publish box date format, see http://php.net/date
+						$datef = __( 'M j, Y @ G:i', 'buddypress' );
+						$date  = date_i18n( $datef, strtotime( $user->user_registered ) );
+						?>
+						<span id="timestamp"><?php printf( __( 'Registered on: <strong>%1$s</strong>', 'buddypress' ), $date ); ?></span>
+
+						<div id='timestampdiv' class='hide-if-js'>
+							<?php touch_time( 1, 0, 5 ); ?>
+						</div><!-- #timestampdiv -->
+					</div>
+				</div> <!-- #misc-publishing-actions -->
+
+				<div class="clear"></div>
+			</div><!-- #minor-publishing -->
+
+			<div id="major-publishing-actions">
+				<div id="publishing-action">
+					<?php submit_button( __( 'Update Profile', 'buddypress' ), 'primary', 'save', false, array( 'tabindex' => '4' ) ); ?>
+				</div>
+				<div class="clear"></div>
+			</div><!-- #major-publishing-actions -->
+
+		</div><!-- #submitcomment -->
+
+		<?php
+	}
+
+	/**
+	 * Renders the xprofile metabox for user's profile screen.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @param WP_User $user The WP_User object for the user's profile to edit
+	 */
+	public function user_admin_profile_metaboxes( $user = null, $args = array() ) {
+
+		if ( empty( $user->ID ) ) {
+			return;
+		}
+
+		$r = bp_parse_args( $args['args'], array(
+			'profile_group_id' => 0,
+			'user_id'          => $user->ID
+		), 'bp_xprofile_user_admin_profile_loop_args' );
+
+		// We really need these args
+		if ( empty( $r['profile_group_id'] ) || empty( $r['user_id'] ) ) {
+			return;
+		}
+
+		if ( bp_has_profile( $r ) ) :
+
+			while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
+
+				<p class="description"><?php bp_the_profile_group_description(); ?></p>
+
+				<table class="form-table">
+					<tbody>
+
+					<?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
+
+						<tr>
+
+							<?php if ( 'textbox' === bp_get_the_profile_field_type() ) : ?>
+
+								<th><label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label></th>
+								<td>
+									<input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>/>
+									<span class="description"><?php bp_the_profile_field_description(); ?></span>
+								</td>
+
+							<?php endif; ?>
+
+							<?php if ( 'textarea' === bp_get_the_profile_field_type() ) : ?>
+
+								<th><label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label></th>
+								<td>
+									<textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>><?php bp_the_profile_field_edit_value(); ?></textarea>
+									<p class="description"><?php bp_the_profile_field_description(); ?></p>
+								</td>
+
+							<?php endif; ?>
+
+							<?php if ( 'selectbox' === bp_get_the_profile_field_type() ) : ?>
+
+								<th><label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label></th>
+								<td>
+									<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
+										<?php bp_the_profile_field_options(); ?>
+									</select>
+									<span class="description"><?php bp_the_profile_field_description(); ?></span>
+								</td>
+
+							<?php endif; ?>
+
+							<?php if ( 'multiselectbox' === bp_get_the_profile_field_type() ) : ?>
+
+								<th><label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label></th>
+								<td>
+									<select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
+
+										<?php bp_the_profile_field_options(); ?>
+
+									</select>
+
+
+									<?php if ( !bp_get_the_profile_field_is_required() ) : ?>
+
+										<p><a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a></p>
+
+									<?php endif; ?>
+									<p class="description"><?php bp_the_profile_field_description(); ?></p>
+								</td>
+
+							<?php endif; ?>
+
+							<?php if ( 'radio' === bp_get_the_profile_field_type() ) : ?>
+
+								<th>
+									<span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
+								</th>
+								<td>
+									<fieldset>
+										<legend class="screen-reader-text"><span><?php bp_the_profile_field_name(); ?></span></legend>
+										<?php bp_the_profile_field_options(); ?>
+									</fieldset>
+
+									<?php if ( !bp_get_the_profile_field_is_required() ) : ?>
+
+										<p><a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a></p>
+
+									<?php endif; ?>
+									<p class="description"><?php bp_the_profile_field_description(); ?></p>
+								</td>
+
+							<?php endif; ?>
+
+							<?php if ( 'checkbox' === bp_get_the_profile_field_type() ) : ?>
+
+								<th>
+									<span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span>
+								</th>
+								<td>
+									<?php bp_the_profile_field_options(); ?>
+									<p class="description"><?php bp_the_profile_field_description(); ?></p>
+								</td>
+
+							<?php endif; ?>
+
+							<?php if ( 'datebox' === bp_get_the_profile_field_type() ) : ?>
+
+								<th>
+									<label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label>
+								</th>
+								<td>
+									<select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
+
+										<?php bp_the_profile_field_options( 'type=day' ); ?>
+
+									</select>
+
+									<select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
+
+										<?php bp_the_profile_field_options( 'type=month' ); ?>
+
+									</select>
+
+									<select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>>
+
+										<?php bp_the_profile_field_options( 'type=year' ); ?>
+
+									</select>
+									<p class="description"><?php bp_the_profile_field_description(); ?></p>
+								</td>
+
+							<?php endif; ?>
+
+						</tr>
+
+					<?php endwhile; ?>
+					</tbody>
+
+				</table>
+				<input type="hidden" name="field_ids[]" id="field_ids_<?php bp_the_profile_group_slug(); ?>" value="<?php bp_the_profile_group_field_ids(); ?>" />
+			<?php endwhile;
+		endif;
+	}
+
+	/**
+	 * Renders the fallback metabox in case a user has been marked as a spammer.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @param WP_User $user The WP_User object for the user's profile to edit
+	 */
+	public function user_admin_spammer_metabox( $user = null ) {
+		?>
+		<p><?php printf( __( '%s has been marked as a spammer, this user&#39;s BuddyPress datas were removed', 'buddypress' ), bp_core_get_user_displayname( $user->ID ) ) ;?></p>
+		<?php
+	}
+
+	/**
+	 * Renders the Avatar metabox to moderate inappropriate images.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @param WP_User $user The WP_User object for the user's profile to edit
+	 */
+	public function user_admin_avatar_metabox( $user = null ) {
+
+		if ( empty( $user->ID ) ) {
+			return;
+		}
+
+		$args = array(
+			'item_id' => $user->ID,
+			'object'  => 'user',
+			'type'    => 'full',
+			'title'   => $user->display_name
+		);
+
+		?>
+
+		<div class="avatar">
+
+			<?php echo bp_core_fetch_avatar( $args ); ?>
+
+			<?php if ( bp_get_user_has_avatar( $user->ID ) ) :
+
+				$query_args = array(
+					'user_id' => $user->ID,
+					'action'  => 'delete_avatar'
+				);
+
+				if ( ! empty( $_REQUEST['wp_http_referer'] ) )
+					$query_args['wp_http_referer'] = urlencode( wp_unslash( $_REQUEST['wp_http_referer'] ) );
+
+					$community_url = add_query_arg( $query_args, $this->edit_profile_url );
+					$delete_link   = wp_nonce_url( $community_url, 'delete_avatar' ); ?>
+
+				<a href="<?php echo esc_url( $delete_link ); ?>" title="<?php _e( 'Delete Avatar', 'buddypress' ); ?>"><span class="dashicons dashicons dashicons-trash"></span> <?php _e( 'Delete Avatar', 'buddypress' ); ?></a></li>
+
+			<?php endif; ?>
+
+		</div>
+		<?php
+	}
+
+	/**
+	 * Renders the Avatar metabox to moderate inappropriate images.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @param WP_User $user The WP_User object for the user's profile to edit
+	 */
+	public function user_admin_stats_metabox( $user = null ) {
+
+		if ( empty( $user->ID ) ) {
+			return;
+		}
+
+		$last_active = bp_get_user_last_activity( $user->ID );
+		$datef       = __( 'M j, Y @ G:i', 'buddypress' );
+		$date        = date_i18n( $datef, strtotime( $last_active ) ); ?>
+
+		<ul>
+			<li><div class="dashicons dashicons-last-active"></div> <?php printf( __( 'Last active: <strong>%1$s</strong>', 'buddypress' ), $date ); ?></li>
+			<?php if ( bp_is_active( 'friends' ) && $friends_amount = friends_get_total_friend_count( $user->ID ) ) : ?>
+				<li><div class="dashicons dashicons-friends"></div> <?php printf( _n( '1 friend', '<strong>%s</strong> friends', $friends_amount, 'buddypress' ), $friends_amount );?></li>
+			<?php endif;
+
+			if ( bp_is_active( 'groups' ) && $groups_amount = bp_get_total_group_count_for_user( $user->ID ) ) : ?>
+				<li><div class="dashicons dashicons-groups"></div> <?php printf( _n( '1 group', '<strong>%s</strong> groups', $groups_amount, 'buddypress' ), $groups_amount );?></li>
+			<?php endif;
+
+			if ( bp_is_active( 'blogs' ) && is_multisite() && $blogs_amount = bp_blogs_total_blogs_for_user( $user->ID ) ) : ?>
+				<li><div class="dashicons dashicons-blogs"></div> <?php printf( _n( '1 site', '<strong>%s</strong> sites', $blogs_amount, 'buddypress' ), $blogs_amount );?></li>
+			<?php endif;
+
+			// Plugins may add their custom stats here...
+			do_action( 'bp_xprofile_user_admin_stats', $user->ID, $user );
+			?>
+		</ul>
+		<?php
+	}
+
+	/**
+	 * Adds a link to user's profile in users listing row actions.
+	 *
+	 * @access public
+	 * @since BuddyPress (?)
+	 *
+	 * @param array $actions the WordPress row actions (edit, delete)
+	 * @param object $user The object for the user's row
+	 */
+	public function row_actions( $actions = '', $user = null ) {
+
+		if ( get_current_user_id() === $user->ID ) {
+			return $actions;
+		}
+
+		$edit_xprofile = add_query_arg( array(
+			'user_id'         => $user->ID,
+			'wp_http_referer' => urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) )
+		), $this->edit_profile_url );
+
+		$edit_action = $actions['edit'];
+		unset( $actions['edit'] );
+
+		$new_edit_actions = array(
+			'edit'          => $edit_action,
+			'edit-xprofile' => '<a href="' . esc_url( $edit_xprofile ) . '">' . __( 'Profile', 'buddypress' ) . '</a>'
+		);
+
+		return array_merge( $new_edit_actions, $actions );
+	}
+}
+
+endif; // class_exists check
+
+/**
+ * Setup xProfile User Admin.
+ *
+ * @since BuddyPress (?)
+ *
+ * @uses buddypress() to get BuddyPress main instance
+ */
+function xprofile_user_admin() {
+	buddypress()->admin->xprofile = new BP_XProfile_User_Admin();
+}
+
+// Load the xprofile user admin
+if ( is_admin() ) {
+	add_action( 'bp_loaded', 'xprofile_user_admin', 11 );
+}
Index: bp-xprofile/bp-xprofile-filters.php
--- bp-xprofile/bp-xprofile-filters.php
+++ bp-xprofile/bp-xprofile-filters.php
@@ -247,16 +247,61 @@
 function bp_xprofile_filter_user_query_populate_extras( BP_User_Query $user_query, $user_ids_sql ) {
 	global $bp, $wpdb;
 
-	if ( bp_is_active( 'xprofile' ) ) {
-		$fullname_field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", bp_xprofile_fullname_field_name() ) );
-		$user_id_names     = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, value as fullname FROM {$bp->profile->table_name_data} WHERE user_id IN ({$user_ids_sql}) AND field_id = %d", $fullname_field_id ) );
+	if ( ! bp_is_active( 'xprofile' ) ) {
+		return;
+	}
 
-		// Loop through names and override each user's fullname
-		foreach ( $user_id_names as $user ) {
-			if ( isset( $user_query->results[ $user->user_id ] ) ) {
-				$user_query->results[ $user->user_id ]->fullname = $user->fullname;
-			}
+	$fullname_field_id = $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE name = %s", bp_xprofile_fullname_field_name() ) );
+	$user_id_names     = $wpdb->get_results( $wpdb->prepare( "SELECT user_id, value as fullname FROM {$bp->profile->table_name_data} WHERE user_id IN ({$user_ids_sql}) AND field_id = %d", $fullname_field_id ) );
+
+	// Loop through names and override each user's fullname
+	foreach ( $user_id_names as $user ) {
+		if ( isset( $user_query->results[ $user->user_id ] ) ) {
+			$user_query->results[ $user->user_id ]->fullname = $user->fullname;
 		}
 	}
 }
 add_filter( 'bp_user_query_populate_extras', 'bp_xprofile_filter_user_query_populate_extras', 2, 2 );
+
+/**
+ * Filter radio profile fields output in administration screens
+ *
+ * @since BuddyPress (2.0.0)
+ *
+ * @param string  $output
+ * @param object  $option
+ * @param integer $field_id
+ * @param boolean $selected
+ * @uses is_admin() to check if in an administration screen
+ * @return string the output for administration screens
+ */
+function bp_xprofile_admin_format_radio( $output = '', $option = null, $field_id = 0, $selected = false ) {
+	if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
+		$output = '<label><input' . $selected . ' type="radio" name="field_' . absint( $field_id ) . '" id="option_' . esc_attr( $option->id ) . '" value="' . esc_attr( stripslashes( $option->name ) ) . '"> ' . esc_attr( stripslashes( $option->name ) ) . '</label><br/>';
+	}
+
+	return $output;
+}
+add_filter( 'bp_get_the_profile_field_options_radio', 'bp_xprofile_admin_format_radio', 10, 4 );
+
+/**
+ * Filter checkbox profile fields output in administration screens
+ *
+ * @since BuddyPress (2.0.0)
+ *
+ * @param string  $output
+ * @param object  $option
+ * @param integer $field_id
+ * @param boolean $selected
+ * @param integer $k
+ * @uses is_admin() to check if in an administration screen
+ * @return string the output for administration screens
+ */
+function bp_xprofile_admin_format_checkbox( $output= '', $option = null, $field_id = 0, $selected = false, $k = 0 ) {
+	if ( is_admin() && ! defined( 'DOING_AJAX' ) ) {
+		$output = '<label><input' . $selected . ' type="checkbox" name="field_' . absint( $field_id ) . '[]" id="field_' . esc_attr( $option->id ) . '_' . absint( $k ) . '" value="' . esc_attr( stripslashes( $option->name ) ) . '"> ' . esc_attr( stripslashes( $option->name ) ) . '</label><br/>';
+	}
+
+	return $output;
+}
+add_filter( 'bp_get_the_profile_field_options_checkbox', 'bp_xprofile_admin_format_checkbox', 10, 5 );
Index: bp-xprofile/bp-xprofile-template.php
--- bp-xprofile/bp-xprofile-template.php
+++ bp-xprofile/bp-xprofile-template.php
@@ -51,9 +51,13 @@
 	function next_group() {
 		$this->current_group++;
 
-		$this->group         = $this->groups[$this->current_group];
-		$this->group->fields = apply_filters( 'xprofile_group_fields', $this->group->fields, $this->group->id );
-		$this->field_count   = count( $this->group->fields );
+		$this->group       = $this->groups[$this->current_group];
+		$this->field_count = 0;
+ 
+		if( ! empty( $this->group->fields ) ) {
+			$this->group->fields = apply_filters( 'xprofile_group_fields', $this->group->fields, $this->group->id );
+			$this->field_count   = count( $this->group->fields );
+		}
 
 		return $this->group;
 	}
