3 * Table Definition for user
5 require_once 'DB/DataObject.php';
7 class User extends DB_DataObject
10 /* the code below is auto generated do not remove the above tag */
12 public $__table = 'user'; // table name
13 public $id; // int(4) primary_key not_null
14 public $password; // varchar(255)
15 public $email; // varchar(255) unique_key
16 public $created; // datetime() not_null
17 public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
20 function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('User',$k,$v); }
22 /* the code above is auto generated do not remove the tag below */
25 function getProfile() {
26 return Profile::staticGet($this->$id);
29 function isSubscribed($other) {
30 assert(!is_null($other));
31 $sub = DB_DataObject::factory('subscription');
32 $sub->subscriber = $this->id;
33 $sub->subscribed = $other->id;