diff options
Diffstat (limited to 'includes/model')
-rw-r--r-- | includes/model/User_model.php | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ -176,6 +176,22 @@ function User_validate_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 * * @param int $planned_arrival_date |