summaryrefslogtreecommitdiff
path: root/includes/pages/guest_login.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/guest_login.php')
-rw-r--r--includes/pages/guest_login.php21
1 files changed, 14 insertions, 7 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('/'));
}
}