How Do I Find Current Users in WordPress?

If you’re looking to find all of the current users of a WordPress site, you can use the wp_users table. To do this, you’ll need to connect to the database and query the table. Here’s an example:

SELECT wp_user.login, wp_user.

user_level, wp_user.user_status FROM wp_users; .

You can also use the get_current_user() function to get the user object for the currently logged-in user.