summaryrefslogtreecommitdiff
path: root/includes/pages/user_settings.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2019-08-24 10:56:59 +0200
committermsquare <msquare@notrademark.de>2019-08-24 10:56:59 +0200
commit3ce3129b6e2ffdae41e61baf4ade3174aa32e559 (patch)
treef11b030ecdbddeb4b436199a91c58c8a820cbb99 /includes/pages/user_settings.php
parent1604d2bce0873777709f65d27bd7d32aaa99c659 (diff)
feature: disable lastname+prename in config
Diffstat (limited to 'includes/pages/user_settings.php')
-rw-r--r--includes/pages/user_settings.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index f6853191..e398e3a8 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -70,13 +70,17 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
}
// Trivia
- $user_source->personalData->last_name = strip_request_item('lastname', $user_source->personalData->last_name);
- $user_source->personalData->first_name = strip_request_item('prename', $user_source->personalData->first_name);
- if (strlen(strip_request_item('dect')) <= 40) {
- $user_source->contact->dect = strip_request_item('dect', $user_source->contact->dect);
- } else {
- $valid = false;
- error(__('For dect numbers are only 40 digits allowed.'));
+ if(config('enable_user_name')) {
+ $user_source->personalData->last_name = strip_request_item('lastname', $user_source->personalData->last_name);
+ $user_source->personalData->first_name = strip_request_item('prename', $user_source->personalData->first_name);
+ }
+ if (config('enable_dect')) {
+ if (strlen(strip_request_item('dect')) <= 40) {
+ $user_source->contact->dect = strip_request_item('dect', $user_source->contact->dect);
+ } else {
+ $valid = false;
+ error(__('For dect numbers are only 40 digits allowed.'));
+ }
}
$user_source->contact->mobile = strip_request_item('mobile', $user_source->contact->mobile);