X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FRemember_me.php;h=ab74844abd98a89dae86ec5f43d0aaf9cf5ec98a;hb=dd61ae8fbeee64c85f8186672292335592be1ff5;hp=3df7a9983166b158b2c0a696be528ddc54478e8b;hpb=8884a5255fb90fda67b63fa0d4252d77176337e5;p=quix0rs-gnu-social.git diff --git a/classes/Remember_me.php b/classes/Remember_me.php index 3df7a99831..ab74844abd 100644 --- a/classes/Remember_me.php +++ b/classes/Remember_me.php @@ -4,7 +4,7 @@ */ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; -class Remember_me extends Memcached_DataObject +class Remember_me extends Managed_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */ @@ -14,17 +14,21 @@ class Remember_me extends Memcached_DataObject public $user_id; // int(4) not_null public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP - /* Static get */ - function staticGet($k,$v=null) - { - return Memcached_DataObject::staticGet('Remember_me',$k,$v); - } - /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE - function sequenceKey() + public static function schemaDef() { - return array(false, false); - } + return array( + 'fields' => array( + 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'), + 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who is logged in'), + 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), + ), + 'primary key' => array('code'), + 'foreign keys' => array( + 'remember_me_user_id_fkey' => array('user', array('user_id' => 'id')), + ), + ); + } }