mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
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.
This commit is contained in:
@@ -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
|
||||
/// <summary>
|
||||
/// Create a new user
|
||||
/// </summary>
|
||||
/// <param name="cmdparams"></param>
|
||||
/// <param name="cmdparams">string array with parameters: firstname, lastname, password, locationX, locationY, email</param>
|
||||
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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user