I am able to use this code along with Jumi to pull up a user's username, name, & id:
[code:1]$user =& JFactory::getUser();
if (!$user->guest) {
echo 'You are logged in as:<br />';
echo 'User name: ' . $user->username . '<br />';
echo 'Real name: ' . $user->name . '<br />';
echo 'User ID : ' . $user->id . '<br />';[/code:1]
How can I pull up other user information a user has submitted through Community Builder?
I need to be able to pull up fields like cb_address, cb_city, cb_state, cb_zipcode, and cb_phone. All these fields are under jos_comprofiler in the database.
Here is the solution I used to retrieve community builder profile information:
[code:1]<?php
//Get CB info for logged in user
$user =& JFactory::getUser();
$db =& JFactory::getDBO();
$query = "SELECT * FROM `jos_comprofiler` WHERE `id` = ".$user->id."; ";
$db->setQuery($query);
$user_info = $db->loadObject();