Forums

Show List of Registered Users? (8 posts)

  1. TomJohnson
    Member
    Posted 3 years ago #

    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?

  2. whooami
    Member
    Posted 3 years ago #

    whois you? anyone? ie, you want it displayed publicly?

  3. TomJohnson
    Member
    Posted 3 years ago #

    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.

  4. TomJohnson
    Member
    Posted 3 years ago #

    I take it this is not possible?

  5. whooami
    Member
    Posted 3 years ago #

    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.

  6. TomJohnson
    Member
    Posted 3 years ago #

    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.

  7. whooami
    Member
    Posted 3 years ago #

    take a look at this:

    http://guff.szub.net/source/page-authors.php

    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 :P

    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.

  8. TomJohnson
    Member
    Posted 3 years ago #

    Thanks Whooami, that's just what I was looking for. I can see some of the user info now and just need to tweak the parameters to show exactly the info I need. Perfect.

Topic Closed

This topic has been closed to new replies.

About this Topic