summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/src/class-tracking.php')
-rw-r--r--plugins/jetpack/src/class-tracking.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/jetpack/src/class-tracking.php b/plugins/jetpack/src/class-tracking.php
index c0744de9..5f4bf88a 100644
--- a/plugins/jetpack/src/class-tracking.php
+++ b/plugins/jetpack/src/class-tracking.php
@@ -91,8 +91,10 @@ class Tracking {
}
$connection_manager = new Connection_Manager();
- $wpcom_user_data = $connection_manager->get_connected_user_data( $user_id );
- update_user_meta( $user_id, 'jetpack_tracks_wpcom_id', $wpcom_user_data['ID'] );
+ $wpcom_user_data = $connection_manager->get_connected_user_data( $user_id );
+ if ( isset( $wpcom_user_data['ID'] ) ) {
+ update_user_meta( $user_id, 'jetpack_tracks_wpcom_id', $wpcom_user_data['ID'] );
+ }
$this->tracking->record_user_event( 'wpa_user_linked', array() );
}