summaryrefslogtreecommitdiff
path: root/includes/pages/user_settings.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-10-17 01:30:10 +0200
committermsquare <msquare@notrademark.de>2018-10-31 13:43:23 +0100
commita2aaba9cab6b7bdf755a023ed2503cf8cf46925a (patch)
tree04275448599cc8ffaf908b3d7fcc984d822f6a17 /includes/pages/user_settings.php
parentd7aea575ff77cd37c326511e7ac5fe49067c63ad (diff)
User: Bugfixes & code cleanup
Diffstat (limited to 'includes/pages/user_settings.php')
-rw-r--r--includes/pages/user_settings.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index bc97099e..f833eec5 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -57,7 +57,11 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
if ($request->has('planned_departure_date')) {
$tmp = parse_date('Y-m-d H:i', $request->input('planned_departure_date') . ' 00:00');
- $result = User_validate_planned_departure_date($user_source->state->arrival_date->getTimestamp(), $tmp);
+ $plannedArrivalDate = $user_source->personalData->planned_arrival_date;
+ $result = User_validate_planned_departure_date(
+ $plannedArrivalDate ? $plannedArrivalDate->getTimestamp() : 0,
+ $tmp
+ );
$user_source->personalData->planned_departure_date = Carbon::createFromTimestamp($result->getValue());
if (!$result->isValid()) {
$valid = false;
@@ -66,7 +70,7 @@ function user_settings_main($user_source, $enable_tshirt_size, $tshirt_sizes)
}
// Trivia
- $user_source->name = strip_request_item('lastname', $user_source['Name']);
+ $user_source->personalData->last_name = strip_request_item('lastname', $user_source['Name']);
$user_source->personalData->first_name = strip_request_item('prename', $user_source['Vorname']);
if (strlen(strip_request_item('dect')) <= 5) {
$user_source->contact->dect = strip_request_item('dect', $user_source['DECT']);