From 90466515839eb34d7fd9984c92f1970ab5d6f3ad Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 16 Sep 2011 00:36:43 +0100 Subject: [PATCH] Pass any region scope through to the CreateUser() method --- OpenSim/Region/Application/OpenSimBase.cs | 13 +++++++++++-- .../UserAccountService/UserAccountService.cs | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 8662ea83ac..54caac4f80 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -422,6 +422,14 @@ namespace OpenSim return clientServer; } + /// + /// Try to set up the estate owner for the given scene. + /// + /// + /// The involves asking the user for information about the user on the console. If the user does not already + /// exist then it is created. + /// + /// private void SetUpEstateOwner(Scene scene) { RegionInfo regionInfo = scene.RegionInfo; @@ -453,8 +461,9 @@ namespace OpenSim string password = MainConsole.Instance.PasswdPrompt("Password"); string email = MainConsole.Instance.CmdPrompt("Email", ""); - // TODO: Where do we put m_regInfo.ScopeID? - account = ((UserAccountService)scene.UserAccountService).CreateUser(first, last, password, email); + account + = ((UserAccountService)scene.UserAccountService).CreateUser( + regionInfo.ScopeID, first, last, password, email); } // } } diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 0acfdcf70a..e071b94dd5 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs @@ -340,7 +340,7 @@ namespace OpenSim.Services.UserAccountService email = MainConsole.Instance.CmdPrompt("Email", ""); else email = cmdparams[5]; - CreateUser(firstName, lastName, password, email); + CreateUser(UUID.Zero, firstName, lastName, password, email); } protected void HandleShowAccount(string module, string[] cmdparams) @@ -452,11 +452,12 @@ namespace OpenSim.Services.UserAccountService /// /// Create a user /// + /// Allows hosting of multiple grids in a single database. Normally left as UUID.Zero /// /// /// /// - public UserAccount CreateUser(string firstName, string lastName, string password, string email) + public UserAccount CreateUser(UUID scopeID, string firstName, string lastName, string password, string email) { UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); if (null == account)