summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.module13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 0f3318cde..0483b5d33 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -575,6 +575,19 @@ function user_validate_name($name) {
}
}
+/**
+ * Validates a user's email address.
+ *
+ * Checks that a user's email address exists and follows all standard
+ * validation rules. Returns error messages when the address is invalid.
+ *
+ * @param $mail
+ * A user's email address.
+ *
+ * @return
+ * If the address is invalid, a human-readable error message is returned.
+ * If the address is valid, nothing is returned.
+ */
function user_validate_mail($mail) {
$mail = trim($mail);
if (!$mail) {