getThemeIdFromName(forge_get_config('default_theme')); } if (getStringFromRequest('submit')) { /* Adding call to library rather than logic that used to be coded in this page */ if (!form_key_is_valid(getStringFromRequest('form_key'))) { exit_form_double_submit('my'); } if ($GLOBALS['sys_require_accept_conditions'] && ! $accept_conditions) { $warning_msg = _("You can't register an account unless you accept the terms of use.") ; } else { $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 GFUser(); $register = $new_user->create($unix_name,$firstname,$lastname,$password1,$password2, $email,$mail_site,$mail_va,$language_id,$timezone,$jabber_address,$jabber_only,$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')) { print '' . _('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())) . '
'; $HTML->footer(array()); 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(array()); exit; } else { $error_msg = $new_user->getErrorMessage(); if (isset($register_error)) { $error_msg .= ' '.$register_error; } } } } $HTML->header(array('title'=>'User Account Registration')); if (!empty($error_msg)) print "