From bee543300fc812277e9a9478dc05b986e00ed44e Mon Sep 17 00:00:00 2001 From: mingchen Date: Thu, 28 Jun 2007 14:45:46 +0000 Subject: *User Profile requests on OGS UserServer now uses XMLRPC instead of REST *Added base support for setting up a master user --- .../Communications/Local/LocalUserServices.cs | 25 ++++++++++++++++++++++ .../Region/Communications/OGS1/OGSUserServices.cs | 17 ++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 1eb574c..2097870 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -114,5 +114,30 @@ namespace OpenSim.Region.Communications.Local } + public UserProfileData SetupMasterUser(string firstName, string lastName) + { + return SetupMasterUser(firstName, lastName, ""); + } + public UserProfileData SetupMasterUser(string firstName, string lastName, string password) + { + UserProfileData profile = getUserProfile(firstName, lastName); + if (profile != null) + { + + return profile; + } + + Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); + this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); + + profile = getUserProfile(firstName, lastName); + + if (profile == null) + { + Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here."); + } + + return profile; + } } } diff --git a/OpenSim/Region/Communications/OGS1/OGSUserServices.cs b/OpenSim/Region/Communications/OGS1/OGSUserServices.cs index 012774d..48d3018 100644 --- a/OpenSim/Region/Communications/OGS1/OGSUserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGSUserServices.cs @@ -11,7 +11,7 @@ namespace OpenSim.Region.Communications.OGS1 { public UserProfileData GetUserProfile(string firstName, string lastName) { - return null; + return GetUserProfile(firstName + " " + lastName); } public UserProfileData GetUserProfile(string name) { @@ -21,5 +21,20 @@ namespace OpenSim.Region.Communications.OGS1 { return null; } + + public UserProfileData SetupMasterUser(string firstName, string lastName) + { + return SetupMasterUser(firstName, lastName, ""); + } + + public UserProfileData SetupMasterUser(string firstName, string lastName, string password) + { + UserProfileData profile = GetUserProfile(firstName, lastName); + if (profile == null) + { + Console.WriteLine("Unknown Master User. Grid Mode: No clue what I should do. Probably would choose the grid owner UUID when that is implemented"); + } + return null; + } } } -- cgit v1.1