/*
         *  Form logout ?
         */
        $is_submit_form_logout = isset($_POST['submit-form-logout']);
        if ($is_submit_form_logout) {
            // Clear the managed service token
            $managed_solr_server->set_service_option('token', '');
        }
        /*
         *  Form signin ?
         */
        $is_submit_form_signin = isset($_POST['submit-form-signin']);
        $form_data = WpSolrExtensions::extract_form_data($is_submit_form_signin, array('email' => array('default_value' => wp_get_current_user()->user_email, 'is_email' => true), 'password' => array('default_value' => '', 'can_be_empty' => false)));
        if ($is_submit_form_signin) {
            if (!$form_data['is_error']) {
                $result_object = $managed_solr_server->call_rest_signin($form_data['email']['value'], $form_data['password']['value']);
                if (OptionManagedSolrServer::is_response_ok($result_object)) {
                    $token = OptionManagedSolrServer::get_response_result($result_object, 'token');
                    $managed_solr_server->set_service_option('token', $token);
                }
            }
        }
        // Display a signin form
        if ('' != $managed_solr_server->get_service_option('token')) {
            WpSolrExtensions::require_with(WpSolrExtensions::get_option_template_file(WpSolrExtensions::OPTION_MANAGED_SOLR_SERVERS, 'template-my-accounts.php'), array('form_data' => $form_data, 'managed_solr_server' => $managed_solr_server, 'option_name' => $option_name));
        } else {
            WpSolrExtensions::require_with(WpSolrExtensions::get_option_template_file(WpSolrExtensions::OPTION_MANAGED_SOLR_SERVERS, 'template-signin-form.php'), array('form_data' => $form_data, 'managed_solr_server' => $managed_solr_server, 'option_name' => $option_name));
        }
        break;
}
?>