Skip to content

Instantly share code, notes, and snippets.

@imarklee
Created May 24, 2014 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imarklee/34a1e1506c31033be2ca to your computer and use it in GitHub Desktop.
Save imarklee/34a1e1506c31033be2ca to your computer and use it in GitHub Desktop.
EasySocial: Retrieving user field data
<?php
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php');
$db = Foundry::db();
$query = array();
$query[] = 'select b.`data`, b.`raw` from `#__social_fields` as a';
$query[] = 'inner joins #__social_fields_data as b';
$query[] = 'on a.id = b.field_id';
$query[] = 'and b.`type`=' . $db->Quote('user');
$query[] = 'where a.`unique_key`=' . $db->Quote('THE_UNIQUE_FIELD_KEY');
$db->setQuery($query);
$result = $db->loadObjectList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment