|
|
@ -41,7 +41,7 @@ function guest_register()
|
|
|
|
$preName = '';
|
|
|
|
$preName = '';
|
|
|
|
$dect = '';
|
|
|
|
$dect = '';
|
|
|
|
$mobile = '';
|
|
|
|
$mobile = '';
|
|
|
|
$mail = '';
|
|
|
|
$email = '';
|
|
|
|
$pronoun = '';
|
|
|
|
$pronoun = '';
|
|
|
|
$email_shiftinfo = false;
|
|
|
|
$email_shiftinfo = false;
|
|
|
|
$email_by_human_allowed = false;
|
|
|
|
$email_by_human_allowed = false;
|
|
|
@ -71,8 +71,8 @@ function guest_register()
|
|
|
|
if ($request->hasPostData('submit')) {
|
|
|
|
if ($request->hasPostData('submit')) {
|
|
|
|
$valid = true;
|
|
|
|
$valid = true;
|
|
|
|
|
|
|
|
|
|
|
|
if ($request->has('nick')) {
|
|
|
|
if ($request->has('username')) {
|
|
|
|
$nickValidation = User_validate_Nick($request->input('nick'));
|
|
|
|
$nickValidation = User_validate_Nick($request->input('username'));
|
|
|
|
$nick = $nickValidation->getValue();
|
|
|
|
$nick = $nickValidation->getValue();
|
|
|
|
|
|
|
|
|
|
|
|
if (!$nickValidation->isValid()) {
|
|
|
|
if (!$nickValidation->isValid()) {
|
|
|
@ -89,13 +89,13 @@ function guest_register()
|
|
|
|
$msg .= error(__('Please enter a nickname.'), true);
|
|
|
|
$msg .= error(__('Please enter a nickname.'), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ($request->has('mail') && strlen(strip_request_item('mail')) > 0) {
|
|
|
|
if ($request->has('email') && strlen(strip_request_item('email')) > 0) {
|
|
|
|
$mail = strip_request_item('mail');
|
|
|
|
$email = strip_request_item('email');
|
|
|
|
if (!check_email($mail)) {
|
|
|
|
if (!check_email($email)) {
|
|
|
|
$valid = false;
|
|
|
|
$valid = false;
|
|
|
|
$msg .= error(__('E-mail address is not correct.'), true);
|
|
|
|
$msg .= error(__('E-mail address is not correct.'), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (User::whereEmail($mail)->first()) {
|
|
|
|
if (User::whereEmail($email)->first()) {
|
|
|
|
$valid = false;
|
|
|
|
$valid = false;
|
|
|
|
$msg .= error(__('E-mail address is already used by another user.'), true);
|
|
|
|
$msg .= error(__('E-mail address is already used by another user.'), true);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -180,7 +180,7 @@ function guest_register()
|
|
|
|
$user = new User([
|
|
|
|
$user = new User([
|
|
|
|
'name' => $nick,
|
|
|
|
'name' => $nick,
|
|
|
|
'password' => $password_hash,
|
|
|
|
'password' => $password_hash,
|
|
|
|
'email' => $mail,
|
|
|
|
'email' => $email,
|
|
|
|
'api_key' => '',
|
|
|
|
'api_key' => '',
|
|
|
|
'last_login_at' => null,
|
|
|
|
'last_login_at' => null,
|
|
|
|
]);
|
|
|
|
]);
|
|
|
@ -279,12 +279,25 @@ function guest_register()
|
|
|
|
div('col-md-6', [
|
|
|
|
div('col-md-6', [
|
|
|
|
div('row', [
|
|
|
|
div('row', [
|
|
|
|
div('col-sm-4', [
|
|
|
|
div('col-sm-4', [
|
|
|
|
form_text('nick', __('Nick') . ' ' . entry_required(), $nick),
|
|
|
|
form_text(
|
|
|
|
|
|
|
|
'username',
|
|
|
|
|
|
|
|
__('Nick') . ' ' . entry_required(),
|
|
|
|
|
|
|
|
$nick,
|
|
|
|
|
|
|
|
false,
|
|
|
|
|
|
|
|
23,
|
|
|
|
|
|
|
|
'nickname'
|
|
|
|
|
|
|
|
),
|
|
|
|
form_info('',
|
|
|
|
form_info('',
|
|
|
|
__('Use up to 23 letters, numbers, connecting punctuations or spaces for your nickname.'))
|
|
|
|
__('Use up to 23 letters, numbers, connecting punctuations or spaces for your nickname.'))
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
div('col-sm-8', [
|
|
|
|
div('col-sm-8', [
|
|
|
|
form_email('mail', __('E-Mail') . ' ' . entry_required(), $mail),
|
|
|
|
form_email(
|
|
|
|
|
|
|
|
'email',
|
|
|
|
|
|
|
|
__('E-Mail') . ' ' . entry_required(),
|
|
|
|
|
|
|
|
$email,
|
|
|
|
|
|
|
|
false,
|
|
|
|
|
|
|
|
'email'
|
|
|
|
|
|
|
|
),
|
|
|
|
form_checkbox(
|
|
|
|
form_checkbox(
|
|
|
|
'email_shiftinfo',
|
|
|
|
'email_shiftinfo',
|
|
|
|
__(
|
|
|
|
__(
|
|
|
@ -300,6 +313,14 @@ function guest_register()
|
|
|
|
)
|
|
|
|
)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
|
|
|
|
div('row', [
|
|
|
|
|
|
|
|
div('col-sm-6', [
|
|
|
|
|
|
|
|
form_password('password', __('Password') . ' ' . entry_required())
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
div('col-sm-6', [
|
|
|
|
|
|
|
|
form_password('password2', __('Confirm password') . ' ' . entry_required())
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
]),
|
|
|
|
div('row', [
|
|
|
|
div('row', [
|
|
|
|
$enable_planned_arrival ? div('col-sm-6', [
|
|
|
|
$enable_planned_arrival ? div('col-sm-6', [
|
|
|
|
form_date(
|
|
|
|
form_date(
|
|
|
@ -314,14 +335,6 @@ function guest_register()
|
|
|
|
$tshirt_sizes, $tshirt_size, __('Please select...')) : ''
|
|
|
|
$tshirt_sizes, $tshirt_size, __('Please select...')) : ''
|
|
|
|
])
|
|
|
|
])
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
div('row', [
|
|
|
|
|
|
|
|
div('col-sm-6', [
|
|
|
|
|
|
|
|
form_password('password', __('Password') . ' ' . entry_required())
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
div('col-sm-6', [
|
|
|
|
|
|
|
|
form_password('password2', __('Confirm password') . ' ' . entry_required())
|
|
|
|
|
|
|
|
])
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
form_checkboxes(
|
|
|
|
form_checkboxes(
|
|
|
|
'angel_types',
|
|
|
|
'angel_types',
|
|
|
|
__('What do you want to do?') . sprintf(
|
|
|
|
__('What do you want to do?') . sprintf(
|
|
|
@ -340,10 +353,10 @@ function guest_register()
|
|
|
|
div('col-md-6', [
|
|
|
|
div('col-md-6', [
|
|
|
|
div('row', [
|
|
|
|
div('row', [
|
|
|
|
$enable_dect ? div('col-sm-4', [
|
|
|
|
$enable_dect ? div('col-sm-4', [
|
|
|
|
form_text('dect', __('DECT'), $dect)
|
|
|
|
form_text('dect', __('DECT'), $dect, false, 40, 'tel-local')
|
|
|
|
]) : '',
|
|
|
|
]) : '',
|
|
|
|
div($enable_dect ? 'col-sm-4' : 'col-sm-12', [
|
|
|
|
div($enable_dect ? 'col-sm-4' : 'col-sm-12', [
|
|
|
|
form_text('mobile', __('Mobile'), $mobile)
|
|
|
|
form_text('mobile', __('Mobile'), $mobile, false, null, 'tel-national')
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
$enable_pronoun ? div('col-sm-4', [
|
|
|
|
$enable_pronoun ? div('col-sm-4', [
|
|
|
|
form_text('pronoun', __('Pronoun'), $pronoun)
|
|
|
|
form_text('pronoun', __('Pronoun'), $pronoun)
|
|
|
@ -351,10 +364,10 @@ function guest_register()
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
$enable_user_name ? div('row', [
|
|
|
|
$enable_user_name ? div('row', [
|
|
|
|
div('col-sm-6', [
|
|
|
|
div('col-sm-6', [
|
|
|
|
form_text('prename', __('First name'), $preName)
|
|
|
|
form_text('prename', __('First name'), $preName, false, null, 'given-name')
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
div('col-sm-6', [
|
|
|
|
div('col-sm-6', [
|
|
|
|
form_text('lastname', __('Last name'), $lastName)
|
|
|
|
form_text('lastname', __('Last name'), $lastName, false, null, 'family-name')
|
|
|
|
])
|
|
|
|
])
|
|
|
|
]) : '',
|
|
|
|
]) : '',
|
|
|
|
form_info(entry_required() . ' = ' . __('Entry required!'))
|
|
|
|
form_info(entry_required() . ' = ' . __('Entry required!'))
|
|
|
|