' . esc_html__( 'AdminWatch Central stores the latest successful login timestamp, password-change timestamp and a locally estimated password-strength classification for each WordPress user after the relevant event is observed. It also stores aggregated missing URL paths, hit counts and timestamps. It can read the current count of valid WordPress sessions for eligible users on its own admin screens, but does not store session tokens or session metadata. It does not collect passwords, password hashes, IP addresses, MFA secrets, referrers, visitor identity data, telemetry or external service data.', 'adminwatch-central' ) . '

' ); } /** @param array $exporters Registered exporters. @return array */ public function exporter( $exporters ) { $exporters['admin-watch'] = array( 'exporter_friendly_name' => __( 'AdminWatch Central account monitoring data', 'adminwatch-central' ), 'callback' => array( $this, 'export' ), ); return $exporters; } /** @param array $erasers Registered erasers. @return array */ public function eraser( $erasers ) { $erasers['admin-watch'] = array( 'eraser_friendly_name' => __( 'AdminWatch Central account monitoring data', 'adminwatch-central' ), 'callback' => array( $this, 'erase' ), ); return $erasers; } /** * Export the only user-linked data collected by this plugin. * * @param string $email_address User email address. * @param int $page Export page number. * @return array */ public function export( $email_address, $page ) { $user = get_user_by( 'email', $email_address ); $data = array(); if ( $user ) { $last_login = get_user_meta( $user->ID, WebStudio_Admin_Watch_Login_Monitor::META_KEY, true ); $password_changed = get_user_meta( $user->ID, WebStudio_Admin_Watch_Password_Monitor::CHANGED_META_KEY, true ); $password_strength = get_user_meta( $user->ID, WebStudio_Admin_Watch_Password_Monitor::STRENGTH_META_KEY, true ); $item_data = array(); if ( $last_login ) { $item_data[] = array( 'name' => __( 'Latest successful login recorded by AdminWatch Central', 'adminwatch-central' ), 'value' => wp_date( DATE_RFC3339, (int) $last_login ), ); } if ( $password_changed ) { $item_data[] = array( 'name' => __( 'Latest password change recorded by AdminWatch Central', 'adminwatch-central' ), 'value' => wp_date( DATE_RFC3339, (int) $password_changed ), ); } if ( $password_strength ) { $item_data[] = array( 'name' => __( 'Password strength classification recorded by AdminWatch Central', 'adminwatch-central' ), 'value' => sanitize_key( $password_strength ), ); } if ( $item_data ) { $data[] = array( 'group_id' => 'admin-watch', 'group_label' => __( 'AdminWatch Central', 'adminwatch-central' ), 'item_id' => 'admin-watch-login-' . $user->ID, 'data' => $item_data, ); } } return array( 'data' => $data, 'done' => true, ); } /** * Remove only the plugin's login timestamp for the requested user. * * @param string $email_address User email address. * @param int $page Erasure page number. * @return array */ public function erase( $email_address, $page ) { $user = get_user_by( 'email', $email_address ); $removed = false; if ( $user ) { $removed = (bool) delete_user_meta( $user->ID, WebStudio_Admin_Watch_Login_Monitor::META_KEY ); $removed = (bool) delete_user_meta( $user->ID, WebStudio_Admin_Watch_Password_Monitor::CHANGED_META_KEY ) || $removed; $removed = (bool) delete_user_meta( $user->ID, WebStudio_Admin_Watch_Password_Monitor::STRENGTH_META_KEY ) || $removed; } return array( 'items_removed' => (bool) $removed, 'items_retained' => false, 'messages' => array(), 'done' => true, ); } }