Skip to content

Instantly share code, notes, and snippets.

@eqdw
Created September 28, 2010 17:16
Show Gist options
  • Save eqdw/601375 to your computer and use it in GitHub Desktop.
Save eqdw/601375 to your computer and use it in GitHub Desktop.
<?php //code to get a joomla user from the database
$query = 'SELECT * FROM #__user WHERE name == "' . $this->article->params->get('user_to_find') . '"';
$db = $mainframe->getDBObject;
$db->setQuery($query,0,0);
$rows = $db->getObjectList();
$i = 0
$users = new array();
foreach($rows as $row){
$users[$i]->name = $row->name;
$users[$i]->username = $row->username;
$users[$i]->createDate = $row->createDate;
$i++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment