diff --git a/plugins/wporg-5ftf/includes/reports.php b/plugins/wporg-5ftf/includes/reports.php
index 4032170..0b98bea 100644
--- a/plugins/wporg-5ftf/includes/reports.php
+++ b/plugins/wporg-5ftf/includes/reports.php
@@ -211,7 +211,7 @@ function render_contributor_report_page() {
Teams |
Full Name |
Email |
- Last login |
+ Last activity (log in or tracked activity) |
Status |
display_name ?? '';
$user_email = $user->user_email ?? '';
$last_login = get_user_meta( $user_id, 'last_logged_in', true );
+ $last_activity = get_user_meta( $user_id, 'last_activity_tracker', true );
$teams = str_replace( ' Team', '', implode( ',', $xprofile_teams ) );
echo '';
echo '' . absint( $user_id ) . ' | ';
@@ -238,7 +239,14 @@ function render_contributor_report_page() {
echo '' . esc_html( $teams ) . ' | ';
echo '' . esc_html( $user_display_name ) . ' | ';
echo '' . esc_html( $user_email ) . ' | ';
- echo '' . esc_html( $last_login ) . ' | ';
+
+ // Either output last activity or last login.
+ if ( $last_activity > $last_login ) {
+ echo '' . esc_html( $last_activity ) . ' | ';
+ } else {
+ echo '' . esc_html( $last_login ) . ' | ';
+ }
+
echo '' . esc_html( $c->post_status ) . ' | ';
echo '
';
$export_data[] = array( $user_id, $c->post_title, $pledge_company_title, $xprofile['hours_per_week'], $teams, $user_display_name, $user_email, $last_login, $c->post_status );