From b7a14de9dfcbaae46f3a47493f43e65247baa7f7 Mon Sep 17 00:00:00 2001 From: flashwave Date: Sat, 28 Aug 2021 20:36:24 +0000 Subject: [PATCH] Registration adjustments. --- public/auth/register.php | 8 +++++++- templates/auth/register.twig | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/public/auth/register.php b/public/auth/register.php index 36172ef8..fb1cb9c0 100644 --- a/public/auth/register.php +++ b/public/auth/register.php @@ -43,10 +43,16 @@ while(!$restricted && !empty($register)) { $checkSpamBot = mb_strtolower($register['question']); $spamBotValid = [ - '19', '21', 'nineteen', 'nine-teen', 'nine teen', 'twentyone', 'twenty-one', 'twenty one', + '21', 'twentyone', 'twenty-one', 'twenty one', + ]; + $spamBotHint = [ + '19', 'nineteen', 'nine-teen', 'nine teen', ]; if(!in_array($checkSpamBot, $spamBotValid)) { + if(in_array($checkSpamBot, $spamBotHint)) + $notices[] = '_play_hint'; + $notices[] = 'Human only cool club, robots begone.'; break; } diff --git a/templates/auth/register.twig b/templates/auth/register.twig index e6a93fed..402a2788 100644 --- a/templates/auth/register.twig +++ b/templates/auth/register.twig @@ -15,7 +15,14 @@
{% for notice in register_notices %} -

{{ notice }}

+ {% if notice == '_play_hint' %} + + {% else %} +

{{ notice }}

+ {% endif %} {% endfor %}