From 16ed2ae68381362cbfe66d10226b9dedbfaacba5 Mon Sep 17 00:00:00 2001 From: msquare Date: Mon, 14 Nov 2016 19:10:29 +0100 Subject: fixed settings validation --- includes/model/User_model.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'includes/model/User_model.php') diff --git a/includes/model/User_model.php b/includes/model/User_model.php index 66aa52e5..6d38a224 100644 --- a/includes/model/User_model.php +++ b/includes/model/User_model.php @@ -175,6 +175,22 @@ function User_validate_mail($mail) { return new ValidationResult(check_email($mail), $mail); } +/** + * Validate user jabber address + * + * @param string $jabber + * Jabber-ID to validate + * @return ValidationResult + */ +function User_validate_jabber($jabber) { + $jabber = strip_item($jabber); + if ($jabber == '') { + // Empty is ok + return new ValidationResult(true, ''); + } + return new ValidationResult(check_email($jabber), $jabber); +} + /** * Validate the planned arrival date * -- cgit v1.2.3-54-g00ecf