Bug fix in create user: create inventory was missing.

slimupdates
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);
}
}

View File

@ -88,6 +88,12 @@ ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.S
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=opensim123;"
; Realm = "useraccounts"
;; These are for creating new accounts by the service
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
[PresenceService]
; for the server connector

View File

@ -72,10 +72,11 @@
[UserAccountService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
;; These are for creating new accounts
;; These are for creating new accounts by the service
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:InventoryService"
[LoginService]
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"