/** * The place to check if the data set in the snippet is valid * to generate the snippet. * * When invalid data should result in an error, you can throw it * here but you can also perform the check in the * checkRegistryRequestsAnswers() function from the * {@see \MUtil_Registry_TargetInterface}. * * @return boolean */ public function hasHtmlOutput() { if (!($this->user->hasAllowedRole() && $this->user->canSetPassword())) { $this->addMessage($this->getNotAllowedMessage()); return false; } return parent::hasHtmlOutput(); }