X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FConfirm_address.php;h=af9dc9157ed127e9d4009a4fa97732232e99ed3d;hb=e2d85a39e7f82ceef2cb2fe66a3a9a62ac9a363e;hp=056df836fc96586b45370af22753a183f835d087;hpb=01c2c31c1e701f6946282dfcc23502464483d12d;p=quix0rs-gnu-social.git diff --git a/classes/Confirm_address.php b/classes/Confirm_address.php index 056df836fc..af9dc9157e 100644 --- a/classes/Confirm_address.php +++ b/classes/Confirm_address.php @@ -2,38 +2,27 @@ /** * Table Definition for confirm_address */ -require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; class Confirm_address extends Managed_DataObject { - ###START_AUTOCODE - /* the code below is auto generated do not remove the above tag */ - public $__table = 'confirm_address'; // table name public $code; // varchar(32) primary_key not_null public $user_id; // int(4) not_null - public $address; // varchar(255) not_null - public $address_extra; // varchar(255) not_null + public $address; // varchar(191) not_null not 255 because utf8mb4 takes more space + public $address_extra; // varchar(191) not_null not 255 because utf8mb4 takes more space public $address_type; // varchar(8) not_null public $claimed; // datetime() public $sent; // datetime() public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP - /* Static get */ - function staticGet($k,$v=null) - { return Memcached_DataObject::staticGet('Confirm_address',$k,$v); } - - /* the code above is auto generated do not remove the tag below */ - ###END_AUTOCODE - public static function schemaDef() { 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 requested confirmation'), - 'address' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'), - 'address_extra' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'carrier ID, for SMS'), + 'address' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'), + 'address_extra' => array('type' => 'varchar', 'length' => 191, 'description' => 'carrier ID, for SMS'), 'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'), 'claimed' => array('type' => 'datetime', 'description' => 'date this was claimed for queueing'), 'sent' => array('type' => 'datetime', 'description' => 'date this was sent for queueing'), @@ -60,7 +49,7 @@ class Confirm_address extends Managed_DataObject return null; } - static function saveNew($user, $address, $addressType, $extra=null) + static function saveNew(User $user, $address, $addressType, $extra=null) { $ca = new Confirm_address();