' . esc_html__( 'User not found.', 'netdesign-session-guard' ) . '

'; return; } $history = Repository::history_for_user( $user->ID, 100 ); $window = (int) Settings::get( 'window_days' ); $stats = Repository::stats_for_users( [ $user->ID ], gmdate( 'Y-m-d H:i:s', time() - $window * DAY_IN_SECONDS ) )[ $user->ID ] ?? null; $devices = [ 'mobile' => '📱', 'tablet' => '📱', 'desktop' => '💻' ]; $since = gmdate( 'Y-m-d H:i:s', time() - $window * DAY_IN_SECONDS ); $flag = FlagRepository::open_for_user( $user->ID ); $latest = $flag ?: FlagRepository::latest_for_user( $user->ID ); $overlaps = OverlapRepository::for_user( $user->ID, 50 ); $together = OverlapRepository::seconds_for_users( [ $user->ID ], $since )[ $user->ID ] ?? 0; $notes = NoteRepository::for_user( $user->ID ); $exempt = (bool) get_user_meta( $user->ID, Enforcer::META_EXEMPT, true ); $courses = apply_filters( 'ndsg_user_extra_info', [], $user->ID ); $ended = [ 'logout' => __( 'Signed out', 'netdesign-session-guard' ), 'policy' => __( 'Device limit', 'netdesign-session-guard' ), 'admin' => __( 'Signed out by admin', 'netdesign-session-guard' ), 'expired' => __( 'Expired', 'netdesign-session-guard' ), 'password' => __( 'Password reset', 'netdesign-session-guard' ), ]; ?>

display_name ); ?> user_email ); ?>

devices ?? 0 ); ?>
networks ?? 0 ); ?>
countries ?? 0 ); ?>
logins ?? 0 ); ?>
reasons, true ) ?: []; ?>
level ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped in Risk::badge(). ?> created_at ) ) ); ?>

$user->ID ] ); ?>

started_at ) ); ?> level ? Risk::badge( $o->level ) : '' . esc_html__( 'Within the grace period', 'netdesign-session-guard' ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- escaped in Risk::badge(). ?> seconds ) ); ?> {"type_$side"} ] ?? '' ) . ' ' . ( $o->{"label_$side"} ?: __( 'Ended session', 'netdesign-session-guard' ) ) ); ?>
{"ip_$side"} ); ?> {"country_$side"} ); ?>
net_a && $o->net_a === $o->net_b ) : ?>

created_at ) ); ?> device_label ); ?>
device_id, 0, 8 ) ); ?>
ip ); ?> country ); ?> last_seen ) ); ?> ended_at ) : ?> end_reason ] ?? $s->end_reason ); ?>