-1], ['id_user' => $config['id_user']] ); // XXX: Also notify UpdateManager. } if ($register_newsletter) { $feedback = newsletter_wiz_process(); } if (is_array($feedback)) { echo json_encode($feedback); } // Ajax calls finish here. exit(); } ui_require_css_file('register'); $initial = isset($config['initial_wizard']) !== true || $config['initial_wizard'] != '1'; $newsletter = db_get_value( 'middlename', 'tusuario', 'id_user', $config['id_user'] ); $show_newsletter = $newsletter == '0' || $newsletter == ''; $registration = isset($config['pandora_uid']) !== true || $config['pandora_uid'] == ''; if ($initial && users_is_admin()) { // Show all forms in order. // 1- Ask for email, timezone, etc. Fullfill alerts and user mail. config_wiz_modal( false, true, (($registration === true) ? 'show_registration_wizard()' : null), true ); } if (!$config['disabled_newsletter']) { if ($registration && users_is_admin()) { // Prepare registration wizard, not launch. leave control to flow. registration_wiz_modal( false, // Launch only if not being launch from 'initial'. !$initial, (($show_newsletter === false) ? 'force_run_newsletter()' : null), true ); } else { if ($show_newsletter) { // Show newsletter wizard for current user. newsletter_wiz_modal( false, // Launch only if not being call from 'registration'. !$registration && !$initial, true ); } } } $welcome = !$registration && !$show_newsletter && !$initial; try { $welcome_window = new WelcomeWindow($welcome); if ($welcome_window !== null) { $welcome_window->run(); } } catch (Exception $e) { $welcome = false; } $newsletter = null; ?>