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.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index 7420e7fb..b30e3d15 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -17,9 +17,6 @@ function guest_register() {
global $tshirt_sizes, $enable_tshirt_size, $default_theme, $user;
$event_config = EventConfig();
- if ($event_config === false) {
- engelsystem_error("Unable to load event config.");
- }
$msg = "";
$nick = "";
@@ -31,6 +28,7 @@ function guest_register() {
$mobile = "";
$mail = "";
$email_shiftinfo = false;
+ $email_by_human_allowed = false;
$jabber = "";
$hometown = "";
$comment = "";
@@ -39,7 +37,7 @@ function guest_register() {
$selected_angel_types = [];
$planned_arrival_date = null;
- $angel_types_source = sql_select("SELECT * FROM `AngelTypes` ORDER BY `name`");
+ $angel_types_source = AngelTypes();
$angel_types = [];
foreach ($angel_types_source as $angel_type) {
$angel_types[$angel_type['id']] = $angel_type['name'] . ($angel_type['restricted'] ? " (restricted)" : "");
@@ -77,6 +75,10 @@ function guest_register() {
$email_shiftinfo = true;
}
+ if (isset($_REQUEST['email_by_human_allowed'])) {
+ $email_by_human_allowed = true;
+ }
+
if (isset($_REQUEST['jabber']) && strlen(strip_request_item('jabber')) > 0) {
$jabber = strip_request_item('jabber');
if (! check_email($jabber)) {
@@ -157,6 +159,7 @@ function guest_register() {
`Handy`='" . sql_escape($mobile) . "',
`email`='" . sql_escape($mail) . "',
`email_shiftinfo`=" . sql_bool($email_shiftinfo) . ",
+ `email_by_human_allowed`=" . sql_bool($email_by_human_allowed) . ",
`jabber`='" . sql_escape($jabber) . "',
`Size`='" . sql_escape($tshirt_size) . "',
`Passwort`='" . sql_escape($password_hash) . "',
@@ -209,7 +212,8 @@ function guest_register() {
]),
div('col-sm-8', [
form_email('mail', _("E-Mail") . ' ' . entry_required(), $mail),
- form_checkbox('email_shiftinfo', _("Please send me an email if my shifts change"), $email_shiftinfo)
+ form_checkbox('email_shiftinfo', _("The engelsystem is allowed to send me an email (e.g. when my shifts change)"), $email_shiftinfo),
+ form_checkbox('email_by_human_allowed', _("Humans are allowed to send me an email (e.g. for ticket vouchers)"), $email_by_human_allowed)
])
]),
div('row', [
@@ -318,9 +322,6 @@ function guest_login() {
}
$event_config = EventConfig();
- if ($event_config === false) {
- engelsystem_error("Unable to load event config.");
- }
return page([
div('col-md-12', [