added bot honeypot on signup

This commit is contained in:
2025-04-03 13:40:00 -06:00
parent 7eebc920a2
commit 4a79bb89d8
3 changed files with 18 additions and 2 deletions
+12 -1
View File
@@ -111,6 +111,7 @@ function signup_form($error_msg = '')
<input type="hidden" name="crop_x" value="" id="crop_x">
<input type="hidden" name="crop_y" value="" id="crop_y">
<input type="hidden" name="crop_width" value="" id="crop_width">
<input name="required_field" id="required_field" value="">
<label for="username">Username</label>
<input id="username" name="username" required>
@@ -151,8 +152,18 @@ function signup_form($error_msg = '')
return $form;
}
function create_user($username, $email, $password, $verify_password, $role_id, $upload = null, $x = null, $y = null, $crop_width = null)
function create_user($username, $email, $password, $verify_password, $role_id, $upload = null, $x = null, $y = null, $crop_width = null, $honeypot)
{
if (!empty($honeypot)) {
$error_msg = '
<div class="error">
You are a bot. Leave now.
</div>
';
return $error_msg;
}
if ($password != $verify_password) {
$error_msg = '
<div class="error">