3 * Table Definition for user_openid
6 if (!defined('STATUSNET')) {
10 class User_openid extends Memcached_DataObject
13 /* the code below is auto generated do not remove the above tag */
15 public $__table = 'user_openid'; // table name
16 public $canonical; // varchar(255) primary_key not_null
17 public $display; // varchar(255) unique_key not_null
18 public $user_id; // int(4) not_null
19 public $created; // datetime() not_null
20 public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
23 function staticGet($k,$v=null)
24 { return Memcached_DataObject::staticGet('User_openid',$k,$v); }
26 /* the code above is auto generated do not remove the tag below */
32 $db = $this->getDatabaseConnection();
33 $dbtype = $db->phptype; // Database type is stored here. Crazy but true.
35 return array('canonical' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
36 'display' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,
37 'user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
38 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,
39 'modified' => ($dbtype == 'mysql' || $dbtype == 'mysqli') ?
40 DB_DATAOBJECT_MYSQLTIMESTAMP + DB_DATAOBJECT_NOTNULL :
41 DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME
46 * List primary and unique keys in this table.
47 * Unique keys used for lookup *MUST* be listed to ensure proper caching.
51 return array_keys($this->keyTypes());
56 return array('canonical' => 'K', 'display' => 'U', 'user_id' => 'U');
60 * No sequence keys in this table.
62 function sequenceKey()
64 return array(false, false, false);
67 Static function hasOpenID($user_id)
69 $oid = new User_openid();
71 $oid->user_id = $user_id;