if (!$request->has('prename') || empty($preName = strip_request_item('prename'))) {
$preName = strip_request_item('prename');
} else {
$valid = false;
$valid = false;
$msg .= error(__('Please enter your first name.'), true);
$msg .= error(__('Please enter your first name.'), true);
}
}
if ($request->has('lastname')) {
if (!$request->has('lastname') || empty($lastName = strip_request_item('lastname'))) {
$lastName = strip_request_item('lastname');
} else {
$valid = false;
$valid = false;
$msg .= error(__('Please enter your last name.'), true);
$msg .= error(__('Please enter your last name.'), true);
}
}
if ($request->has('mobile')) {
if (!$request->has('mobile') || empty($mobile = strip_request_item('mobile'))) {
$mobile = strip_request_item('mobile');
if (User::whereName($mobile)->count() > 0) {
$valid = false;
$msg .= error(__('This mobile number is already in use.'), true);
}
} else {
$valid = false;
$valid = false;
$msg .= error(__('Please enter your mobile number.'), true);
$msg .= error(__('Please enter your mobile number.'), true);
} else if (User::whereName($mobile)->count() > 0) {
$valid = false;
$msg .= error(__('This mobile number is already in use.'), true);
}
}
if ($request->has('mobile_consent')) {
if ($request->has('mobile_consent')) {
@ -314,6 +306,10 @@ function guest_register()
$lastName = $form_data['last_name'];
$lastName = $form_data['last_name'];
}
}
if (!$mobile && !empty($form_data['phone_number'])) {
$mobile = $form_data['phone_number'];
}
return page_with_title(register_title(), [
return page_with_title(register_title(), [
form_element('', __('By completing this form you\'re registering as a Chaos-Angel. This script will create you an account in the angel task scheduler.')),
form_element('', __('By completing this form you\'re registering as a Chaos-Angel. This script will create you an account in the angel task scheduler.')),