aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-04 23:48:35 +0100
committerJustin Clark-Casey (justincc)2011-10-04 23:48:35 +0100
commitb907a66f394b279d3ca2b1ac620bc7bb13cc6dd2 (patch)
treea1841184d9c88585afda4abdd31298501c74ab84 /OpenSim/Region/Application/OpenSimBase.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-b907a66f394b279d3ca2b1ac620bc7bb13cc6dd2.zip
opensim-SC-b907a66f394b279d3ca2b1ac620bc7bb13cc6dd2.tar.gz
opensim-SC-b907a66f394b279d3ca2b1ac620bc7bb13cc6dd2.tar.bz2
opensim-SC-b907a66f394b279d3ca2b1ac620bc7bb13cc6dd2.tar.xz
When creating a new user on the comand line, give the option of allowing a UUID to be specified to override the randomly generated one.
This can be useful in some migration cases where recreating user accounts with known IDs will preserve region scene object ownership.
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 866ba9a..a6b91a3 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -462,9 +462,18 @@ namespace OpenSim
462 string password = MainConsole.Instance.PasswdPrompt("Password"); 462 string password = MainConsole.Instance.PasswdPrompt("Password");
463 string email = MainConsole.Instance.CmdPrompt("Email", ""); 463 string email = MainConsole.Instance.CmdPrompt("Email", "");
464 464
465 string rawPrincipalId = MainConsole.Instance.CmdPrompt("ID", UUID.Random().ToString());
466
467 UUID principalId = UUID.Zero;
468 if (!UUID.TryParse(rawPrincipalId, out principalId))
469 {
470 m_log.ErrorFormat("[OPENSIM]: ID {0} is not a valid UUID", rawPrincipalId);
471 return;
472 }
473
465 account 474 account
466 = ((UserAccountService)scene.UserAccountService).CreateUser( 475 = ((UserAccountService)scene.UserAccountService).CreateUser(
467 regionInfo.ScopeID, first, last, password, email); 476 regionInfo.ScopeID, principalId, first, last, password, email);
468 } 477 }
469// } 478// }
470 } 479 }