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 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Application/OpenSim.cs')
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
{
--
cgit v1.1