/** * Redirect user immediately to receive_csr step if number e-mail * addresses is zero or both configured and available addresses equal * 1. Otherwise, display mail selection form. * @see Content_Page::pre_process() */ function pre_process($person) { parent::pre_process($person); $this->tpl->assign('extraScripts', array('js/jquery-1.6.1.min.js')); $this->tpl->assign('rawScript', file_get_contents('../include/rawToggleExpand.js')); $this->person->clearRegCertEmails(); $emailsDesiredByNREN = $this->person->getNREN()->getEnableEmail(); $registeredPersonMails = $this->person->getNumEmails(); $redirect = "receive_csr.php" . "?skipped_email=yes"; $redirect .= "&anticsrf=" . Framework::getAntiCSRF(); switch ($emailsDesiredByNREN) { case '0': header("Location: {$redirect}"); exit(0); break; case '1': case 'm': if ($registeredPersonMails == 1) { $this->person->regCertEmail($this->person->getEmail()); $this->person->storeRegCertEmails(); header("Location: {$redirect}"); exit(0); } break; } }
/** * triggerAdminIssues() - post error-messages * * Function will report issues in the form of errors to the screen when an * admin looks at the portal and something is amiss. This includes: * * - missing privacy notice for the NREN * - missing about_nren text * - incomplete or missing attribute-map * * @param void * @return void * @access private */ private function triggerAdminIssues() { if (!isset($this->person)) { return; } $nren = $this->person->getNREN(); if (!$nren) { return; } $url_arg = "?mode=admin&show=text&anticsrf=" . Framework::getAntiCSRF(); if (!$nren->hasHelpText()) { Framework::warning_output("Missing NREN help-text. <a href=\"stylist.php" . $url_arg . "#edit_help\">Configure</a>"); } if (!$nren->hasAboutText()) { Framework::warning_output("Missing About-NREN text. <a href=\"stylist.php" . $url_arg . "#edit_about\">Configure</a>"); } if (!$nren->hasPrivacyNotice()) { Framework::warning_output("Missing privacy-notice. <a href=\"stylist.php" . $url_arg . "#edit_pn\">Configure</a>"); } }