summaryrefslogtreecommitdiff
path: root/includes/pages/user_settings.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-11-21 19:00:42 +0100
committermsquare <msquare@notrademark.de>2017-11-21 19:00:42 +0100
commitbb2681a7c818f80b3c8de18d2f0f9a0889d9f731 (patch)
treea2d2b5e5d0a8afe06e7725f27c6f7a7815bcce5e /includes/pages/user_settings.php
parentb95d4ece8ab28ff4821a8aeb471396ed30a94912 (diff)
add validation of dect numbers
Diffstat (limited to 'includes/pages/user_settings.php')
-rw-r--r--includes/pages/user_settings.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index 0ba8bbcb..83d593ad 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -78,7 +78,12 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
$user_source['Vorname'] = strip_request_item('prename', $user_source['Vorname']);
$user_source['Alter'] = strip_request_item('age', $user_source['Alter']);
$user_source['Telefon'] = strip_request_item('tel', $user_source['Telefon']);
- $user_source['DECT'] = strip_request_item('dect', $user_source['DECT']);
+ if(strlen(strip_request_item('dect')) <= 5) {
+ $user_source['DECT'] = strip_request_item('dect', $user_source['DECT']);
+ } else {
+ $valid = false;
+ error(_('For dect numbers are only 5 digits allowed.'));
+ }
$user_source['Handy'] = strip_request_item('mobile', $user_source['Handy']);
$user_source['Hometown'] = strip_request_item('hometown', $user_source['Hometown']);