diff --git a/src/online/current_user.cpp b/src/online/current_user.cpp index 69447a1a8..043fb8ff8 100644 --- a/src/online/current_user.cpp +++ b/src/online/current_user.cpp @@ -88,26 +88,6 @@ namespace Online m_profile = NULL; } // CurrentUser - - // ------------------------------------------------------------------------ - const XMLRequest * CurrentUser::requestSignUp(const core::stringw &username, - const core::stringw &password, - const core::stringw &password_confirm, - const core::stringw &email) - { - assert(m_state == US_SIGNED_OUT || m_state == US_GUEST); - XMLRequest * request = new XMLRequest(); - request->setServerURL("client-user.php"); - request->addParameter("action", "register"); - request->addParameter("username", username); - request->addParameter("password", password); - request->addParameter("password_confirm", password_confirm); - request->addParameter("email", email); - request->addParameter("terms", "on"); - request->queue(); - return request; - } // requestSignUp - // ------------------------------------------------------------------------ /** Request a login using the saved credentials of the user. */ diff --git a/src/online/current_user.hpp b/src/online/current_user.hpp index 437794139..292d6a30d 100644 --- a/src/online/current_user.hpp +++ b/src/online/current_user.hpp @@ -165,13 +165,6 @@ namespace Online void requestSignOut(); ServerJoinRequest * requestServerJoin(uint32_t server_id, bool request_now = true); - - /** Register */ - const XMLRequest * requestSignUp( const irr::core::stringw &username, - const irr::core::stringw &password, - const irr::core::stringw &password_ver, - const irr::core::stringw &email); - const XMLRequest * requestGetAddonVote(const std::string & addon_id) const; const SetAddonVoteRequest * requestSetAddonVote(const std::string & addon_id, float rating) const; void requestFriendRequest(const uint32_t friend_id) const; diff --git a/src/states_screens/register_screen.cpp b/src/states_screens/register_screen.cpp index eea5a42a7..2281d0524 100644 --- a/src/states_screens/register_screen.cpp +++ b/src/states_screens/register_screen.cpp @@ -124,8 +124,15 @@ void RegisterScreen::acceptTerms() core::stringw password_confirm= getWidget("password_confirm")->getText().trim(); core::stringw email = getWidget("email")->getText().trim(); - m_signup_request = CurrentUser::get()->requestSignUp(username, password, - password_confirm, email); + m_signup_request = new XMLRequest(); + m_signup_request->setServerURL("client-user.php"); + m_signup_request->addParameter("action", "register" ); + m_signup_request->addParameter("username", username ); + m_signup_request->addParameter("password", password ); + m_signup_request->addParameter("password_confirm", password_confirm); + m_signup_request->addParameter("email", email ); + m_signup_request->addParameter("terms", "on" ); + m_signup_request->queue(); } // acceptTerms // ----------------------------------------------------------------------------- diff --git a/src/states_screens/register_screen.hpp b/src/states_screens/register_screen.hpp index 01362bb84..000d26270 100644 --- a/src/states_screens/register_screen.hpp +++ b/src/states_screens/register_screen.hpp @@ -43,7 +43,8 @@ private: /** Save the pointer to the options widget, it is widely used. */ GUIEngine::RibbonWidget *m_options_widget; - const Online::XMLRequest *m_signup_request; + /** The XML request to the server. */ + Online::XMLRequest *m_signup_request; /** True if the info message (email was sent...) is shown. */ bool m_info_message_shown;