mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-10 04:25:44 +03:00
Contributors: Add CSV report of inactive contributors
This commit is contained in:
parent
add3f255fb
commit
b86470575f
4 changed files with 193 additions and 3 deletions
|
@ -84,6 +84,10 @@ function get_all_xprofile_contributor_hours_teams() : array {
|
|||
function get_xprofile_contribution_data( array $user_ids ) {
|
||||
global $wpdb;
|
||||
|
||||
if ( empty( $user_ids ) ) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$sql = $wpdb->prepare( '
|
||||
SELECT user_id, field_id, value
|
||||
FROM bpmain_bp_xprofile_data
|
||||
|
@ -111,6 +115,7 @@ function prepare_xprofile_contribution_data( array $raw_data ) {
|
|||
|
||||
foreach ( $raw_data as $datum ) {
|
||||
$user_id = $datum['user_id'];
|
||||
$prepared_data[ $user_id ]['user_id'] = $user_id;
|
||||
$field_key = $field_keys_by_id[ (int) $datum['field_id'] ];
|
||||
$field_value = maybe_unserialize( $datum['value'] );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue