aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/input.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/input.php')
-rw-r--r--engine/lib/input.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index 17a330851..324b0cec4 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -107,6 +107,16 @@ function sanitise_filepath($path, $append_slash = TRUE) {
}
/**
+ * Validates an email address.
+ *
+ * @param string $address Email address.
+ * @return bool
+ */
+function is_email_address($address) {
+ return filter_var($address, FILTER_VALIDATE_EMAIL) === $address;
+}
+
+/**
* Page handler for autocomplete endpoint.
*
* @param $page