added bot honeypot on signup
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user