_('Account registration blocked'))); foreach ($params['error'] as $e) { echo '
'.$HTML->error_msg($e).'
'; error_log($params['error']); } site_footer(); exit; } if ($valide) { $activate_immediately = getIntFromRequest('activate_immediately'); if (($activate_immediately == 1) && forge_check_global_perm ('forge_admin')) { $send_mail = false; $activate_immediately = true; } else { $send_mail = true; $activate_immediately = false; } $new_user = new FFUser(); $register = $new_user->create($unix_name,$firstname,$lastname,$password1,$password2, $email,$mail_site,$mail_va,$language_id,$timezone,$theme_id,'', $address,$address2,$phone,$fax,$title,$ccode,$send_mail); if ($register) { site_header(array('title'=>_('Register Confirmation'))); if ($activate_immediately) { if (!$new_user->setStatus('A')) { echo $HTML->error_msg(_('Error during user activation but after user registration (user is now in pending state and will not get a notification eMail!)')); print '' . sprintf(_("Could not activate newly registered user's forge account: %s"), htmlspecialchars($new_user->getErrorMessage())) . '
'; site_footer(); exit; } } if ($send_mail) { echo ''; printf(_('You have registered the %1$s account on %2$s.'), $new_user->getUnixName(), forge_get_config ('forge_name')); echo '
'; print '' . _('A confirmation email is being sent to verify the submitted email address. Visiting the link sent in this email will activate the account.') . '
'; } else { print '' ; printf (_('You have registered and activated user %1$s on %2$s. They will not receive an eMail about this fact.'), $unix_name, forge_get_config('forge_name')); print '
' ; } site_footer(); exit; } else { $error_msg = $new_user->getErrorMessage(); if (isset($register_error)) { $error_msg .= ' '.$register_error; } } } } if (!isset($timezone) || empty($timezone) || !preg_match('/^[-a-zA-Z0-9_\/\.+]+$/', $timezone)) { $timezone = forge_get_config('default_timezone') ? forge_get_config('default_timezone') : 'GMT' ; } if (!isset($ccode) || empty($ccode) || !preg_match('/^[a-zA-Z]{2}$/', $ccode)) { $ccode = forge_get_config('default_country_code'); } site_header(array('title'=>_('User Account Registration'))); echo $HTML->openForm(array('action' => '/account/register.php', 'method' => 'post')); echo html_e('input', array('type' => 'hidden', 'name' => 'form_key', 'value' => form_generate_key())); ?>
');
}
?>
(Very low traffic and includes security notices. Highly Recommended.)'); ?>
(Low traffic.)'); ?>
addRequiredFieldsInfoBox(); echo html_e('p', array(), html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => _('Register')))); echo $HTML->closeForm(); echo html_e('p', array(), util_make_link('/account/pending-resend.php', _('Resend confirmation email to a pending account'))); ?>