From 14c587bea1e0acfca0ba1842c5a1fa10bdf45548 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 13 Jun 2010 21:45:39 +0100 Subject: Thank you, Snoopy2, for a patch to fix RemoteAdmin. Committed with the following changes: - Start location is NOT optional. The signature was defined with it being mandataory and there is no reason to change it - Adjusted comments to remove misleading or no longer true comments. Default is neuter, according to the code, not male, as the comment stated. --- .../UserAccountService/UserAccountService.cs | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'OpenSim/Services/UserAccountService') diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 063251a..326e502 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs @@ -357,7 +357,7 @@ namespace OpenSim.Services.UserAccountService /// /// /// - public void CreateUser(string firstName, string lastName, string password, string email) + private void CreateUser(string firstName, string lastName, string password, string email) { UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); if (null == account) @@ -374,12 +374,14 @@ namespace OpenSim.Services.UserAccountService if (StoreUserAccount(account)) { - bool success = false; + bool success; if (m_AuthenticationService != null) + { success = m_AuthenticationService.SetPassword(account.PrincipalID, password); - if (!success) - m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.", - firstName, lastName); + if (!success) + m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.", + firstName, lastName); + } GridRegion home = null; if (m_GridService != null) @@ -399,18 +401,22 @@ namespace OpenSim.Services.UserAccountService firstName, lastName); if (m_InventoryService != null) + { success = m_InventoryService.CreateUserInventory(account.PrincipalID); - if (!success) - m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.", - firstName, lastName); + if (!success) + m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.", + firstName, lastName); + } m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName); + } else { + m_log.ErrorFormat("[USER ACCOUNT SERVICE]: Account creation failed for account {0} {1}", firstName, lastName); } } else { m_log.ErrorFormat("[USER ACCOUNT SERVICE]: A user with the name {0} {1} already exists!", firstName, lastName); } - } + } } } -- cgit v1.1