Skip to content

Commit

Permalink
Users, not posts.
Browse files Browse the repository at this point in the history
  • Loading branch information
dd32 committed Jun 26, 2023
1 parent fb5fdda commit 405bc28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mu-plugins/admin/user-list-last-logged-in.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

add_filter( 'manage_users_columns', __NAMESPACE__ . '\manage_users_columns' );
add_filter( 'manage_users_sortable_columns', __NAMESPACE__ . '\manage_users_sortable_columns' );
add_action( 'pre_get_users', __NAMESPACE__ . '\pre_get_posts' );
add_action( 'pre_get_users', __NAMESPACE__ . '\pre_get_users' );
add_filter( 'manage_users_custom_column', __NAMESPACE__ . '\manage_users_custom_column', 10, 3 );

function manage_users_columns( $columns ) {
Expand All @@ -18,7 +18,7 @@ function manage_users_sortable_columns( $columns ) {
return $columns;
}

function pre_get_posts( $query ) {
function pre_get_users( $query ) {
if ( ! is_admin() || 'last-logged-in' !== $query->get( 'orderby' ) || ! current_user_can( 'list_users' ) ) {
return;
}
Expand Down

0 comments on commit 405bc28

Please sign in to comment.