2 if (!defined('MICROBLOG')) { exit(1) }
4 * Table Definition for user
6 require_once 'DB/DataObject.php';
8 class User extends DB_DataObject
11 /* the code below is auto generated do not remove the above tag */
13 public $__table = 'user'; // table name
14 public $id; // int(4) primary_key not_null
15 public $password; // varchar(255)
16 public $email; // varchar(255) unique_key
17 public $created; // datetime() not_null
18 public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
21 function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('User',$k,$v); }
23 /* the code above is auto generated do not remove the tag below */
26 function getProfile() {
27 return Profile::staticGet($this->$id);
30 function isSubscribed($other) {
31 assert(!is_null($other));
32 $sub = DB_DataObject::factory('subscription');
33 $sub->subscriber = $this->id;
34 $sub->subscribed = $other->id;