*
* @return string
*/
- public static function content(array $parameters = [])
+ public function content(): string
{
// logged in users can register others (people/pages/groups)
// even with closed registrations, unless specifically prohibited by site policy.
$tpl = $arr['template'];
- $tos = new Tos();
+ $tos = new Tos($this->parameters);
$o = Renderer::replaceMacros($tpl, [
'$invitations' => DI::config()->get('system', 'invitation_only'),
* Extend this method if the module is supposed to process POST requests.
* Doesn't display any content
*/
- public static function post(array $parameters = [])
+ public function post()
{
BaseModule::checkFormSecurityTokenRedirectOnError('/register', 'register');
$using_invites = DI::config()->get('system', 'invitation_only');
$num_invites = DI::config()->get('system', 'number_invites');
- $invite_id = (!empty($_POST['invite_id']) ? Strings::escapeTags(trim($_POST['invite_id'])) : '');
+ $invite_id = (!empty($_POST['invite_id']) ? trim($_POST['invite_id']) : '');
if (intval(DI::config()->get('config', 'register_policy')) === self::OPEN) {
if ($using_invites && $invite_id) {