From 02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 23 Nov 2008 03:38:40 +0000 Subject: Mantis#2660. Thank you kindly, Ruud Lathrop for a patch that: This patch adds the option of adding the email when you create a new user. This works in Gridmode as none Gridmode. This option is also added to RemoteAdminPlugin. With a new handler you can create a user with a email. --- OpenSim/Region/Application/OpenSim.cs | 29 ++++++++++++++++++++++++----- OpenSim/Region/Application/OpenSimBase.cs | 4 ++-- 2 files changed, 26 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index e3aee9d..765c471 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -516,7 +516,14 @@ namespace OpenSim switch (args[0]) { case "user": - CreateUser(args); + if (ConfigurationSettings.Standalone) + { + CreateUser(args); + } + else + { + m_console.Notice("Create user is not available in grid mode, use the user-server."); + } break; } } @@ -537,7 +544,14 @@ namespace OpenSim switch (args[1]) { case "password": - ResetUserPassword(args); + if (ConfigurationSettings.Standalone) + { + ResetUserPassword(args); + } + else + { + m_console.Notice("Reset user password is not available in grid mode, use the user-server."); + } break; } @@ -734,12 +748,13 @@ 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; @@ -751,7 +766,7 @@ namespace OpenSim lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); else lastName = cmdparams[2]; - if ( cmdparams.Length < 4 ) + if (cmdparams.Length < 4) password = MainConsole.Instance.PasswdPrompt("Password"); else password = cmdparams[3]; @@ -763,9 +778,13 @@ namespace OpenSim regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); else regY = Convert.ToUInt32(cmdparams[5]); + if (cmdparams.Length < 7) + email = MainConsole.Instance.CmdPrompt("Email", ""); + else email = cmdparams[6]; + if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName)) { - CreateUser(firstName, lastName, password, regX, regY); + CreateUser(firstName, lastName, password, email, regX, regY); } else { diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index fc531f5..608de06 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -298,9 +298,9 @@ namespace OpenSim m_assetCache = new AssetCache(assetServer); } - public UUID CreateUser(string tempfirstname, string templastname, string tempPasswd, uint regX, uint regY) + public UUID CreateUser(string tempfirstname, string templastname, string tempPasswd, string email, uint regX, uint regY) { - return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, regX, regY); + return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, email, regX, regY); } /// -- cgit v1.1