how can I fetch a list of registered users and show it in the admin panel. I know theres the list inside the admin panel already but I've added a few tables and I need to show them in a new tab menu inside the admin panel.
What you've done is incredibly bad practice, and should be undone immediatley. There is already a dedicated table for storing user details aka User Meta. Altering the user table could cause issues with other plugins and Core, prevent upgrades working, and bypasses all the caching and object stores WordPress puts in place. It also adds additional avenues for SQL injections.
TLDR: Never modify Core WP Tables
Instead use the provided User Meta API:
They work in the same way get_post_meta etc work, and there is already a dedicated table, and additional APIs for querying via
Then display this using the answer here:
To search for users based on meta use the
|show 6 more comments|