diff options
Diffstat (limited to 'includes/pages')
-rw-r--r-- | includes/pages/guest_login.php | 21 | ||||
-rw-r--r-- | includes/pages/user_shifts.php | 6 |
2 files changed, 17 insertions, 10 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php index 0577951f..9e71e180 100644 --- a/includes/pages/guest_login.php +++ b/includes/pages/guest_login.php @@ -45,7 +45,7 @@ function guest_register() $nick = ''; $lastName = ''; $preName = ''; - $age = ''; + $age = 0; $tel = ''; $dect = ''; $mobile = ''; @@ -157,6 +157,9 @@ function guest_register() $valid = false; error(_('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.')); } + } else { + $valid = false; + error(_('Please enter your planned date of arrival. It should be after the buildup start date and before teardown end date.')); } $selected_angel_types = []; @@ -214,9 +217,13 @@ function guest_register() `CreateDate`, `Sprache`, `arrival_date`, - `planned_arrival_date` + `planned_arrival_date`, + `force_active`, + `lastLogIn`, + `api_key`, + `got_voucher` ) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), ?, NULL, ?) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), ?, NULL, ?, FALSE, 0, "", 0) ', [ config('theme'), @@ -228,8 +235,8 @@ function guest_register() $dect, $mobile, $mail, - (bool)$email_shiftinfo, - (bool)$email_by_human_allowed, + (int)$email_shiftinfo, + (int)$email_by_human_allowed, $jabber, $tshirt_size, $password_hash, @@ -249,7 +256,7 @@ function guest_register() $user_angel_types_info = []; foreach ($selected_angel_types as $selected_angel_type_id) { DB::insert( - 'INSERT INTO `UserAngelTypes` (`user_id`, `angeltype_id`) VALUES (?, ?)', + 'INSERT INTO `UserAngelTypes` (`user_id`, `angeltype_id`, `supporter`) VALUES (?, ?, FALSE)', [$user_id, $selected_angel_type_id] ); $user_angel_types_info[] = $angel_types[$selected_angel_type_id]; @@ -271,7 +278,7 @@ function guest_register() return User_registration_success_view($event_config['event_welcome_msg']); } - redirect('?'); + redirect(page_link_to('/')); } } diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 24b9251a..f8cf71cd 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -96,7 +96,7 @@ function load_rooms() ); if (empty($rooms)) { error(_('The administration has not configured any rooms yet.')); - redirect('?'); + redirect(page_link_to('/')); } return $rooms; } @@ -115,7 +115,7 @@ function load_days() if (empty($days)) { error(_('The administration has not configured any shifts yet.')); - redirect('?'); + redirect(page_link_to('/')); } return $days; } @@ -129,7 +129,7 @@ function load_types() if (!count(DB::select('SELECT `id`, `name` FROM `AngelTypes` WHERE `restricted` = 0'))) { error(_('The administration has not configured any angeltypes yet - or you are not subscribed to any angeltype.')); - redirect('?'); + redirect(page_link_to('/')); } $types = DB::select(' SELECT |