From 96ecdcf9c5ba35e589a599ad37cc6ce1a83f46f1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 9 Jan 2010 18:04:50 -0800 Subject: * Added SetPassword to IAuthenticationService. * Added create user command to UserAccountService. Works. * Deleted create user command from OpenSim. --- OpenSim/Region/Application/OpenSim.cs | 74 ----------------------------------- 1 file changed, 74 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 82b2fd4..787d025 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -349,9 +349,6 @@ namespace OpenSim if (ConfigurationSettings.Standalone) { - m_console.Commands.AddCommand("region", false, "create user", - "create user [ [ [ [ []]]]]", - "Create a new user", HandleCreateUser); m_console.Commands.AddCommand("region", false, "reset user password", "reset user password [ [ []]]", @@ -813,22 +810,6 @@ namespace OpenSim } /// - /// Execute switch for some of the create commands - /// - /// - private void HandleCreateUser(string module, string[] cmd) - { - if (ConfigurationSettings.Standalone) - { - CreateUser(cmd); - } - else - { - m_log.Info("Create user is not available in grid mode, use the user server."); - } - } - - /// /// Execute switch for some of the reset commands /// /// @@ -1076,61 +1057,6 @@ namespace OpenSim } /// - /// Create a new user - /// - /// string array with parameters: firstname, lastname, password, locationX, locationY, email - protected void CreateUser(string[] cmdparams) - { - string firstName; - string lastName; - string password; - string email; - uint regX = 1000; - uint regY = 1000; - - IConfig standalone; - if ((standalone = m_config.Source.Configs["StandAlone"]) != null) - { - regX = (uint)standalone.GetInt("default_location_x", (int)regX); - regY = (uint)standalone.GetInt("default_location_y", (int)regY); - } - - - if (cmdparams.Length < 3) - firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); - else firstName = cmdparams[2]; - - if (cmdparams.Length < 4) - lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); - else lastName = cmdparams[3]; - - if (cmdparams.Length < 5) - password = MainConsole.Instance.PasswdPrompt("Password"); - else password = cmdparams[4]; - - if (cmdparams.Length < 6) - regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", regX.ToString())); - else regX = Convert.ToUInt32(cmdparams[5]); - - if (cmdparams.Length < 7) - regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); - else regY = Convert.ToUInt32(cmdparams[6]); - - if (cmdparams.Length < 8) - email = MainConsole.Instance.CmdPrompt("Email", ""); - else email = cmdparams[7]; - - if (null == m_commsManager.UserProfileCacheService.GetUserDetails(firstName, lastName)) - { - m_commsManager.UserAdminService.AddUser(firstName, lastName, password, email, regX, regY); - } - else - { - m_log.ErrorFormat("[CONSOLE]: A user with the name {0} {1} already exists!", firstName, lastName); - } - } - - /// /// Reset a user password. /// /// -- cgit v1.1