users U ORDER BY U.ID DESC"; $aallusers = $wpdb->get_col( $wpdb->prepare($sql5)); echo "

Results from Activation

"; // loop through the users foreach ( $aallusers as $iallusersUserID ) : // check to see if the user is active in wp_bp_xprofile_data $sql6 = "SELECT XP.user_id FROM $wpdb->bp_xprofile_data XP WHERE XP.user_id = $iallusersUserID"; $acheck_for_user_xprofile = $wpdb->get_col( $wpdb->prepare($sql6)); if ($acheck_for_user_xprofile) { echo $iallusersUserID; echo " - already exists, no action taken"; echo "
"; } else { // update the xprofile field for each user that does not have a record // grab this users nicename $user = get_userdata( $iallusersUserID ); $nicename = $user->user_nicename; // create a new record in bp_xprofile_data and add the nicename xprofile_set_field_data( 1, $iallusersUserID, $nicename ); echo $iallusersUserID; echo " - Activated"; echo "
"; } unset ($acheck_for_user_xprofile); endforeach; echo '
'; } ?>


" . __( 'Settings Updated.', 'bp-example' ) . "

" ?> prefix; // wpdb->call not working on Xprofile table and bp_activity $sql = "SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY ID DESC"; $aUsersID = $wpdb->get_col( $wpdb->prepare($sql)); $total_users = count($aUsersID); echo "$total_users Total Users | "; $sql7 = "SELECT XP.user_id FROM ".$table_prefix."bp_xprofile_data XP WHERE XP.user_id = $iUserID"; $acount_user_xprofile = $wpdb->get_col( $wpdb->prepare($sql7)); $total_not_active = count($acount_user_xprofile); if ($total_not_active == '0') { echo "0 inactive users detected by this plug-in"; } else { echo " $total_not_active are not active in buddpress"; if ( is_admin() ) { // security check ... all clear.... display the form button ?>

Users from your previous Wordpress install NOT active in your BP community are marked with a green background.

user_email; $username = $user->display_name; $registered = strtotime($user->user_registered); // grab the user role $capabilities = $user->{$wpdb->prefix . 'capabilities'}; if ( !isset( $wp_roles ) ) $wp_roles = new WP_Roles(); foreach ( $wp_roles->role_names as $role => $name ) : if ( array_key_exists( $role, $capabilities ) ) $userrole = $role; endforeach; // check to see if the user is active in activity $sql2 = "SELECT * FROM ".$table_prefix."bp_activity activity WHERE activity.user_id = $iUserID"; $acheck_for_bp_activity = $wpdb->get_col( $wpdb->prepare($sql2)); if ($acheck_for_bp_activity) { $check_for_bp_activity_answer = "yes"; } else { $check_for_bp_activity_answer = "no"; } unset ($acheck_for_bp_activity); // check to see if the user is active in wp_usermeta last_activity $sql3 = "SELECT UM.user_id, UM.meta_key FROM $wpdb->usermeta UM WHERE UM.user_id = $iUserID AND UM.meta_key LIKE 'last_activity'"; $acheck_for_user_meta = $wpdb->get_col( $wpdb->prepare($sql3)); if ($acheck_for_user_meta) { $check_for_user_meta_answer = "yes"; } else { $check_for_user_meta_answer = "no"; } unset ($acheck_for_user_meta); // check to see if the user is active in wp_bp_xprofile_data $sql4 = "SELECT XP.user_id FROM ".$table_prefix."bp_xprofile_data XP WHERE XP.user_id = $iUserID"; $acheck_for_user_xprofile = $wpdb->get_col( $wpdb->prepare($sql4)); $rowclass = '"background-color: #FFF;"'; if ($acheck_for_user_xprofile) { $check_for_user_xprofile_answer = "yes"; } else { $check_for_user_xprofile_answer = "no"; $rowclass = '"background-color: #AAFFAA;"'; } unset ($acheck_for_user_xprofile); ?> >
Username E-mail X Profile BP Activity Last Activity Role
user_login; ?> (ID: )