protected function initAuthor() { $this->author = new BlorgAuthor(); $this->author->setDatabase($this->app->db); if ($this->id !== null) { if (!$this->author->load($this->id)) { throw new AdminNotFoundException(sprintf(Blorg::_('Author with id ‘%s’ not found.'), $this->id)); } $instance_id = $this->author->getInternalValue('instance'); if ($instance_id !== $this->app->getInstanceId()) { throw new AdminNotFoundException(sprintf(Blorg::_('Author with id ‘%d’ not found.'), $this->id)); } } }