Skip to content

Instantly share code, notes, and snippets.

@unlobito
Forked from HinchyMinecraft/gist:609024
Created October 3, 2010 22:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save unlobito/609025 to your computer and use it in GitHub Desktop.
<?php
// ACME API
// bbPress database model
$this->load->library('acmebbuser');
class ACME_bbPress extends Model {
function ACME_bbPress() {
parent::Model();
}
function fetchUserData() {
$query = $this->db->get('bb_users');
$query = $query->result_array();
$user = $this->acmebbuser->getInstance();
$user->id = $query['id'];
$user->posts = $query['postcount'];
// ...and so on
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment