/** * Download certificate */ public function downloadCertificate() { if ($cert_id = (int) $_GET['cert_id']) { /** @var srCertificate $cert */ $cert = srCertificate::find($cert_id); if ($cert->getUserId() == $this->user->getId() && $cert->getDefinition()->getDownloadable()) { parent::downloadCertificate(); } } }
/** * */ public function __construct() { parent::__construct(); $this->tpl->setTitle($this->pl->txt('administrate_certificates')); }