$user     = &JFactory::getUser();
 $user_id   = $user->getParam('id');
...
.....

 $query =  'SELECT vm.address, vm.city, vm.state, vm.zipcode'
   . ' FROM #__comprofiler AS vm'
   . ' WHERE vm.userid = '. $userid
 ;

 $database->setQuery( $query, 0 );
 $vmrows = $database->loadObjectList();

// There should be only one record ... this should keep the last found
   foreach($vmrows as $vm_row) {
      $address = $vm_row->address;
      $city    = $vm_row->city;
      $state   = $vm_row->state;
      $zip     = $vm_row->zipcode;
   }
Your Answer
Sign In
Enter email and password to comment or answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.