Forums

Displaying User Data to A Page (2 posts)

  1. Veneration
    Member
    Posted 2 years ago #

    Hi everyone,

    I'm looking to display the "Aim" and "YahooIM" userdata fields to a table or something of that nature.

    I'm currently forced to manually collect and repost the information, and its getting really, really slow!

    Thanks for any help,
    Tom

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Don't have those values for users in my test database but this will help:

    <?php
    //displays users along with some fields  (uncomment--delete the two slashes
    //on the echo "<pre>"; print_r($user); echo "</pre>"; line to see all
    //the values
    
    $blogusers = get_users_of_blog();
    if ($blogusers) {
      foreach ($blogusers as $bloguser) {
        $user = get_userdata($bloguser->user_id);
    //    echo "<pre>"; print_r($user); echo "</pre>";
        echo '<p>User ID ' . $user->ID . ' ' . $user->user_firstname . ' ' . $user->user_lastname . ' ' . $user->user_yim . ' ' .$user->user_aim  . '</p>';
      }
    }
    ?>

    Related: Author Templates

Topic Closed

This topic has been closed to new replies.

About this Topic