summaryrefslogtreecommitdiff
path: root/includes/model
diff options
context:
space:
mode:
Diffstat (limited to 'includes/model')
-rw-r--r--includes/model/User_model.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/includes/model/User_model.php b/includes/model/User_model.php
index d3597f54..66aa52e5 100644
--- a/includes/model/User_model.php
+++ b/includes/model/User_model.php
@@ -164,6 +164,18 @@ function User_validate_Nick($nick) {
}
/**
+ * Validate user email address.
+ *
+ * @param string $mail
+ * The email address to validate
+ * @return ValidationResult
+ */
+function User_validate_mail($mail) {
+ $mail = strip_item($mail);
+ return new ValidationResult(check_email($mail), $mail);
+}
+
+/**
* Validate the planned arrival date
*
* @param int $planned_arrival_date