<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>bbPress Support Forums &#187; Topic: How to print all user profiles</title>
		<link>http://bbpress.org/forums/topic/how-to-print-all-user-profiles</link>
		<description>bbPress Support Forums &#187; Topic: How to print all user profiles</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 08:15:36 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://bbpress.org/forums/rss/topic/how-to-print-all-user-profiles" rel="self" type="application/rss+xml" />

		<item>
			<title>iang on "How to print all user profiles"</title>
			<link>http://bbpress.org/forums/topic/how-to-print-all-user-profiles#post-37768</link>
			<pubDate>Mon, 29 Jun 2009 14:36:13 +0000</pubDate>
			<dc:creator>iang</dc:creator>
			<guid isPermaLink="false">37768@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Thanks Sam...this is exactly what I needed to get me going after being stuck for days :-)<br />
For completeness, here is the first working version of my code:</p>
<p>&#60;?php<br />
require_once('../bb-load.php');<br />
bb_get_header();<br />
?&#62;</p>
<p>&#60;script src="../my-js/sorttable.js"&#62;&#60;/script&#62;<br />
&#60;?php</p>
<p>$tbl_header=&#60;&#60;&#60;EOD<br />
   <br />&#60;/br&#62;<br />
   &#60;h3&#62;&#60;center&#62;&#60;font color="<a href="http://trac.bbpress.org/ticket/880000">#880000</a>"&#62;WBS80 Registered Users&#60;/font&#62;&#60;/center&#62;&#60;/h3&#62;<br />
   &#60;center&#62;&#60;i&#62;&#60;font size="2"&#62;(click on table header to sort&#60;/font&#62;)&#60;/i&#62;&#60;/center&#62;<br />
   <br />&#60;/br&#62;<br />
   &#60;table class="sortable" width='100%' border='1' cellpadding='4' cellspacing='0' align='center'&#62;<br />
   &#60;tr&#62;<br />
      &#60;th&#62;lname&#60;/th&#62;<br />
      &#60;th&#62;fname&#60;/th&#62;<br />
      &#60;th&#62;email&#60;/th&#62;<br />
      &#60;th&#62;city&#60;/th&#62;<br />
      &#60;th&#62;state/province&#60;/th&#62;<br />
      &#60;th&#62;country&#60;/th&#62;<br />
   &#60;/tr&#62;<br />
EOD;</p>
<p>$user_ids = $bbdb-&#62;get_col( "SELECT ID FROM $bbdb-&#62;users WHERE user_status = 0 ORDER BY id;", 0 );</p>
<p>foreach ($user_ids as $key =&#62; $value) {</p>
<p>  if ($value == 1) {<br />
    continue;<br />
  }</p>
<p>  $users = bb_get_user( $value );</p>
<p>  $lname = strtolower($users-&#62;last_name);<br />
  $fname = strtolower($users-&#62;first_name);<br />
  $email = strtolower($users-&#62;user_email);<br />
  $city = strtolower($users-&#62;city);<br />
  $state = strtolower($users-&#62;state);<br />
  $country = strtolower($users-&#62;country);</p>
<p>$tbl_info .=&#60;&#60;&#60;EOD<br />
&#60;tr&#62;<br />
&#60;td&#62;$lname&#60;/td&#62;<br />
&#60;td&#62;$fname&#60;/td&#62;<br />
&#60;td&#62;$email&#60;/td&#62;<br />
&#60;td&#62;$city&#60;/td&#62;<br />
&#60;td&#62;$state&#60;/td&#62;<br />
&#60;td&#62;$country&#60;/td&#62;<br />
&#60;/tr&#62;<br />
EOD;</p>
<p>}</p>
<p>$tbl_footer = "&#60;/table&#62;";</p>
<p>$tbl =&#60;&#60;&#60;TBL<br />
   $tbl_header<br />
   $tbl_info<br />
   $tbl_footer<br />
TBL;</p>
<p>print $tbl;</p>
<p>?&#62;<br />
&#60;p&#62;&#60;h3 id="tag"&#62;AGE QUOD AGIS&#60;/h3&#62;&#60;/p&#62;<br />
&#60;?php bb_get_footer(); ?&#62;
</p>]]></description>
					</item>
		<item>
			<title>chrishajer on "How to print all user profiles"</title>
			<link>http://bbpress.org/forums/topic/how-to-print-all-user-profiles#post-37722</link>
			<pubDate>Sun, 28 Jun 2009 15:18:10 +0000</pubDate>
			<dc:creator>chrishajer</dc:creator>
			<guid isPermaLink="false">37722@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Thanks Sam.  I didn't know what was wrong, but I did see the typo.
</p>]]></description>
					</item>
		<item>
			<title>Sam Bauers on "How to print all user profiles"</title>
			<link>http://bbpress.org/forums/topic/how-to-print-all-user-profiles#post-37713</link>
			<pubDate>Sun, 28 Jun 2009 05:18:21 +0000</pubDate>
			<dc:creator>Sam Bauers</dc:creator>
			<guid isPermaLink="false">37713@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>You aren't inside a function so there's no need to globalise <code>$bbdb</code>.</p>
<p>This will get you every user (including all meta) into the array <code>$users</code>:</p>
<pre><code>$user_ids = $bbdb-&#62;get_col( &#34;SELECT ID FROM $bbdb-&#62;users WHERE user_status = 0 ORDER BY id;&#34;, 0 );
$users = bb_get_user( $user_ids );
print_r( $users );</code></pre>]]></description>
					</item>
		<item>
			<title>chrishajer on "How to print all user profiles"</title>
			<link>http://bbpress.org/forums/topic/how-to-print-all-user-profiles#post-37711</link>
			<pubDate>Sun, 28 Jun 2009 02:49:10 +0000</pubDate>
			<dc:creator>chrishajer</dc:creator>
			<guid isPermaLink="false">37711@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>Hopefully this is only a typo here, not in your actual code:</p>
<p><code>global $bddb;</code></p>
<p>Should be $bbdb.
</p>]]></description>
					</item>
		<item>
			<title>iang on "How to print all user profiles"</title>
			<link>http://bbpress.org/forums/topic/how-to-print-all-user-profiles#post-37708</link>
			<pubDate>Sun, 28 Jun 2009 02:37:04 +0000</pubDate>
			<dc:creator>iang</dc:creator>
			<guid isPermaLink="false">37708@http://bbpress.org/forums/</guid>
			<description><![CDATA[<p>I want to display a list of all the users on my blog (wbs80.com) and their profile information.<br />
I have been looking at the bbpress code and trying several tests...but unfortunately without success.</p>
<p>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:</p>
<p>&#60;?php<br />
require_once ('../../bb-load.php');</p>
<p>global $bddb;</p>
<p>$profile_keys = get_profile_info_keys();<br />
//print_r($profile_keys);</p>
<p>$userinfo = $bbdb-&#62;get_results("SELECT * FROM $bbdb-&#62;users WHERE user_status = 0 ORDER BY 'ID'");<br />
//print_r($userinfo);</p>
<p>foreach ($userinfo as $key) {</p>
<p>$metainfo = $bbdb-&#62;get_results("SELECT * FROM $bbdb-&#62;usermeta WHERE user_id = $key-&#62;ID");</p>
<p>// ???</p>
<p>}<br />
?&#62;</p>
<p>I don't know how to use the "profile_keys" value(s) to access the "metainfo" data structure and extract the data.</p>
<p>Any help would be greatly appreciated!
</p>]]></description>
					</item>

	</channel>
</rss>

