How do I show a list of all registered users for a site? The users aren’t writing any posts, and their role is minimal, such as Contributor. I’m familiar with how to show site authors, but it seems like someone has to write a post before the author tag works. I want more of a social network effect, where you can see all registered users/members of a site. Any idea how I can do this?
whois you? anyone? ie, you want it displayed publicly?
By “you,” I mean all other registered users, or even non-registered users too. I want to create a little community effect for people who register for the site.
you answered the ‘you’, now the second 1/2 of the question.
you want it displayed publicly?
Its possible, but its helpful to know exactly what someone wants first.
Yes, I would like to display the list of registered users publicly. If you can point me in the right direction, or explain briefly how to do this, I’d really appreciate it. Thanks whooami.
take a look at this:
You might need to do a little tweeking with the fields, but its a great start. I managed to use it to get a list of users and emails in 2 seconds. I would show ya the page but there’s emails on it, and Im guessing my users would kill me for that 😛
That, in its simplest form :
<?php require('wp-blog-header.php'); ?> <?php $order = 'user_nicename'; $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY $order"); // query users foreach($users as $user) : // start users' profile "loop" ?> <?php echo $user->user_login; ?> <?php // echo $user->user_firstname; ?> <?php // echo $user->user_lastname; ?> <?php // echo $user->user_nickname; ?> <?php // echo $user->user_email; ?> <?php echo " -- "; ?> <?php echo $user->user_email; ?> <?php // echo $user->user_url; ?> <?php echo $user->user_icq; ?> <?php echo $user->user_aim; ?> <?php echo $user->user_msn; ?> <?php echo $user->user_yim; ?> <?php // echo $user->user_nicename; ?> <?php echo "<br />"; ?> <?php endforeach; // end of the users' profile 'loop' ?>
will grab all users, irrespective of their role.
- The topic ‘Show List of Registered Users?’ is closed to new replies.