protected function hook_preCreate() { $q = $this->_getQuery(); $q->addTable('files'); $this->file_owner = $this->_AppUI->user_id; if (!$this->file_version_id) { $q->addQuery('file_version_id'); $q->addOrder('file_version_id DESC'); $q->setLimit(1); $latest_file_version = $q->loadResult(); $this->file_version_id = $latest_file_version + 1; } else { $q->addUpdate('file_checkout', ''); $q->addWhere('file_version_id = ' . (int) $this->file_version_id); $q->exec(); } $this->file_date = $q->dbfnNowWithTZ(); parent::hook_preCreate(); }
protected function hook_preCreate() { $this->perm_func = 'addLogin'; $this->user_password = $this->authenticator->hashPassword($this->user_password); parent::hook_preCreate(); }
protected function hook_preCreate() { $q = $this->_getQuery(); $this->project_created = $q->dbfnNowWithTZ(); parent::hook_preCreate(); }
protected function hook_preCreate() { $this->forum_create_date = $this->_AppUI->convertToSystemTZ($this->forum_create_date); parent::hook_preCreate(); }