Skip to content

Instantly share code, notes, and snippets.

@Uriel29
Created November 13, 2016 15:21
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 Uriel29/5f3e8ed6a138dc4e4e8087aaeea1a74b to your computer and use it in GitHub Desktop.
Save Uriel29/5f3e8ed6a138dc4e4e8087aaeea1a74b to your computer and use it in GitHub Desktop.
Código para pegar dados do usuário e de qualquer campo do Seblod. Código by Marcio Garrido
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id', 'name', 'cep', 'associacao_associado','cpf','cnpj','endereco','celular')));
$query->from($db->quoteName('vjboleto'));
$query->where($db->quoteName('id') . ' = '.$db->quote($user->id));
$query->order('id ASC');
$db->setQuery($query);
$row = $db->loadRow();
$dados_boleto['sacado'] = $row['1'];
$dados_boleto['usuario_joomla'] = $row['0'];
$dados_boleto['email'] = $user->email;
$dados_boleto['cpf'] = $row['4'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment