aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application
diff options
context:
space:
mode:
authorCharles Krinke2008-11-23 03:38:40 +0000
committerCharles Krinke2008-11-23 03:38:40 +0000
commit02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8 (patch)
treef95a3170f3dd41be8ccf10957aef7209492a0279 /OpenSim/Region/Application
parentAdd error handling to catch the WebExceptions thrown if you have (diff)
downloadopensim-SC_OLD-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.zip
opensim-SC_OLD-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.tar.gz
opensim-SC_OLD-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.tar.bz2
opensim-SC_OLD-02fd7751d9b89d838fc8ca2dc60fe11f4cfe93a8.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs29
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs4
2 files changed, 26 insertions, 7 deletions
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
516 switch (args[0]) 516 switch (args[0])
517 { 517 {
518 case "user": 518 case "user":
519 CreateUser(args); 519 if (ConfigurationSettings.Standalone)
520 {
521 CreateUser(args);
522 }
523 else
524 {
525 m_console.Notice("Create user is not available in grid mode, use the user-server.");
526 }
520 break; 527 break;
521 } 528 }
522 } 529 }
@@ -537,7 +544,14 @@ namespace OpenSim
537 switch (args[1]) 544 switch (args[1])
538 { 545 {
539 case "password": 546 case "password":
540 ResetUserPassword(args); 547 if (ConfigurationSettings.Standalone)
548 {
549 ResetUserPassword(args);
550 }
551 else
552 {
553 m_console.Notice("Reset user password is not available in grid mode, use the user-server.");
554 }
541 break; 555 break;
542 } 556 }
543 557
@@ -734,12 +748,13 @@ namespace OpenSim
734 /// <summary> 748 /// <summary>
735 /// Create a new user 749 /// Create a new user
736 /// </summary> 750 /// </summary>
737 /// <param name="cmdparams"></param> 751 /// <param name="cmdparams">string array with parameters: firstname, lastname, password, locationX, locationY, email</param>
738 protected void CreateUser(string[] cmdparams) 752 protected void CreateUser(string[] cmdparams)
739 { 753 {
740 string firstName; 754 string firstName;
741 string lastName; 755 string lastName;
742 string password; 756 string password;
757 string email;
743 uint regX = 1000; 758 uint regX = 1000;
744 uint regY = 1000; 759 uint regY = 1000;
745 760
@@ -751,7 +766,7 @@ namespace OpenSim
751 lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); 766 lastName = MainConsole.Instance.CmdPrompt("Last name", "User");
752 else lastName = cmdparams[2]; 767 else lastName = cmdparams[2];
753 768
754 if ( cmdparams.Length < 4 ) 769 if (cmdparams.Length < 4)
755 password = MainConsole.Instance.PasswdPrompt("Password"); 770 password = MainConsole.Instance.PasswdPrompt("Password");
756 else password = cmdparams[3]; 771 else password = cmdparams[3];
757 772
@@ -763,9 +778,13 @@ namespace OpenSim
763 regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString())); 778 regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", regY.ToString()));
764 else regY = Convert.ToUInt32(cmdparams[5]); 779 else regY = Convert.ToUInt32(cmdparams[5]);
765 780
781 if (cmdparams.Length < 7)
782 email = MainConsole.Instance.CmdPrompt("Email", "");
783 else email = cmdparams[6];
784
766 if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName)) 785 if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName))
767 { 786 {
768 CreateUser(firstName, lastName, password, regX, regY); 787 CreateUser(firstName, lastName, password, email, regX, regY);
769 } 788 }
770 else 789 else
771 { 790 {
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
298 m_assetCache = new AssetCache(assetServer); 298 m_assetCache = new AssetCache(assetServer);
299 } 299 }
300 300
301 public UUID CreateUser(string tempfirstname, string templastname, string tempPasswd, uint regX, uint regY) 301 public UUID CreateUser(string tempfirstname, string templastname, string tempPasswd, string email, uint regX, uint regY)
302 { 302 {
303 return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, regX, regY); 303 return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, email, regX, regY);
304 } 304 }
305 305
306 /// <summary> 306 /// <summary>