Fix date range to filter suspcicious accounts and possible affected users

This commit is contained in:
Champ Camba
2023-07-07 17:37:43 +08:00
parent bd14db9e68
commit 3ca3d0c0e8
2 changed files with 8 additions and 6 deletions
+5 -3
View File
@@ -82,15 +82,17 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
$query->set(
'date_query',
array(
'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago',
'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago',
'inclusive' => true,
)
);
} elseif ( $date_from && $date_to ) {
$query->set(
'date_query',
array(
'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago',
'before' => human_time_diff( $date_to, strtotime( current_time( 'mysql' ) ) ) . ' ago',
'after' => human_time_diff( $date_from, strtotime( current_time( 'mysql' ) ) ) . ' ago',
'before' => human_time_diff( $date_to, strtotime( current_time( 'mysql' ) ) ) . ' ago',
'inclusive' => true,
)
);
}