diff --git a/index.php b/index.php index e77e675..6607f08 100644 --- a/index.php +++ b/index.php @@ -134,7 +134,7 @@ if ($formdata = $mform->get_data()) { } // Email filter - if (array_key_exists('email', $formdata)) { + if (array_key_exists('email', $formdata) and !empty($formdata->email)) { $email_like = $DB->sql_like('u.email', "'%{$formdata->email}%'", false); $whereors[] = "($email_like)"; }