aa_user_raw_list

 

Used to filter the list of users created to display

this example can you used to remove user makr as denied by the “new user approve” plugin https://wordpress.org/plugins/new-user-approve/

 

function aa_user_raw_list( $users ){
   $filtered_users = array();
   foreach ( $users as $user ) {
      $user_status = get_user_meta( $user->user_id, 'pw_user_status', true );
      if ( 'denied' !== $user_status ) {
         $filtered_users[] = $user;
      }
   }

   return $filtered_users;
}
add_filter( 'aa_user_raw_list','aa_user_raw_list' );

 

%d bloggers like this: