From d939668d6a54bb25cbc56ec840058c08992fe536 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 13 Jan 2010 10:15:14 -0800 Subject: Bug fix in create user: create inventory was missing. --- OpenSim/Services/UserAccountService/UserAccountService.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index a1dbb1e..c55013f 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs @@ -47,6 +47,7 @@ namespace OpenSim.Services.UserAccountService protected IGridService m_GridService; protected IAuthenticationService m_AuthenticationService; protected IPresenceService m_PresenceService; + protected IInventoryService m_InventoryService; public UserAccountService(IConfigSource config) : base(config) @@ -72,6 +73,10 @@ namespace OpenSim.Services.UserAccountService if (presenceServiceDll != string.Empty) m_PresenceService = LoadPlugin(presenceServiceDll, new Object[] { config }); + string invServiceDll = userConfig.GetString("InventoryService", string.Empty); + if (invServiceDll != string.Empty) + m_InventoryService = LoadPlugin(invServiceDll, new Object[] { config }); + MainConsole.Instance.Commands.AddCommand("UserService", false, "create user", "create user [ [ [ []]]]", @@ -291,6 +296,13 @@ namespace OpenSim.Services.UserAccountService m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to retrieve home region for account {0} {1}.", 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); + + m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName); } } -- cgit v1.1