Bug fix in create user: create inventory was missing.

This commit is contained in:
Diva Canto
2010-01-13 10:15:14 -08:00
parent 901e94c836
commit d939668d6a
3 changed files with 20 additions and 1 deletions

View File

@@ -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<IPresenceService>(presenceServiceDll, new Object[] { config });
string invServiceDll = userConfig.GetString("InventoryService", string.Empty);
if (invServiceDll != string.Empty)
m_InventoryService = LoadPlugin<IInventoryService>(invServiceDll, new Object[] { config });
MainConsole.Instance.Commands.AddCommand("UserService", false,
"create user",
"create user [<first> [<last> [<pass> [<email>]]]]",
@@ -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);
}
}