<?php
class cFbUser {
	var $uid;
	var $data;
	
	function cFbUser( $user_data ) {
		$this->data = $user_data;
		$this->get_uid();
	}
	
	function get_uid() {
		global $db;
		
		//$row = $db->get_row( 'CALL moUserGet('.$this->fbid().')' );
		$row = $db->get_row( 'SELECT * FROM user WHERE user_fbid='.$this->fbid() );
		
		if ( isset($row) )
			$this->uid = $row->user_uid;
	}
	
	function uid() {
		return $this->uid;
	}
	
	function name() {
		return $this->data['name'];
	}
	
	function fbid() {
		return $this->data['uid'];
	}
	
	function pic() {
		return $this->data['pic'];
	}
}
?>