How to print all user profiles
-
I want to display a list of all the users on my blog (wbs80.com) and their profile information.
I have been looking at the bbpress code and trying several tests…but unfortunately without success.
My approach is to get the list of profile keys, get the list of users and for each user display the username and profile information. The code segment that I have is:
<?php
require_once (‘../../bb-load.php’);
global $bddb;
$profile_keys = get_profile_info_keys();
//print_r($profile_keys);
$userinfo = $bbdb->get_results(“SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY ‘ID'”);
//print_r($userinfo);
foreach ($userinfo as $key) {
$metainfo = $bbdb->get_results(“SELECT * FROM $bbdb->usermeta WHERE user_id = $key->ID”);
// ???
}
?>
I don’t know how to use the “profile_keys” value(s) to access the “metainfo” data structure and extract the data.
Any help would be greatly appreciated!
- You must be logged in to reply to this topic.