/** Module preparation */ public function prepare() { // Create and check general database table fields configuration //db()->createField($this, $this->dbTable, 'dbConfirmField', 'VARCHAR('.$this->hashLength.')'); //db()->createField($this, $this->dbTable, 'dbHashEmailField', 'VARCHAR('.$this->hashLength.')'); //db()->createField($this, $this->dbTable, 'dbHashPasswordField', 'VARCHAR('.$this->hashLength.')'); return parent::prepare(); }
/** Prepare module data */ public function prepare() { $class = get_class($this); // Check table if (!isset($this->dbTable)) { return e('Cannot load "' . $class . '" module - no $dbTable is configured'); } // Social system specific configuration check if ($class != __CLASS__) { db()->createField($this, $this->dbTable, 'dbIdField', 'VARCHAR(50)'); } // Create and check general database table fields configuration db()->createField($this, $this->dbTable, 'dbNameField', 'VARCHAR(50)'); db()->createField($this, $this->dbTable, 'dbSurnameField', 'VARCHAR(50)'); db()->createField($this, $this->dbTable, 'dbEmailField', 'VARCHAR(50)'); db()->createField($this, $this->dbTable, 'dbGenderField', 'VARCHAR(10)'); db()->createField($this, $this->dbTable, 'dbBirthdayField', 'DATE'); db()->createField($this, $this->dbTable, 'dbPhotoField', 'VARCHAR(125)'); return parent::prepare(); }