diff options
author | Diva Canto | 2009-12-29 16:34:02 -0800 |
---|---|---|
committer | Diva Canto | 2009-12-29 16:34:02 -0800 |
commit | 88d2df597e499600357c86ad0b1a755a13e9c6b1 (patch) | |
tree | d635d95896c0b3cbe843ccb1462987b3d1409059 /OpenSim/Services/UserService | |
parent | Renamed user account modules to be consistent (diff) | |
download | opensim-SC_OLD-88d2df597e499600357c86ad0b1a755a13e9c6b1.zip opensim-SC_OLD-88d2df597e499600357c86ad0b1a755a13e9c6b1.tar.gz opensim-SC_OLD-88d2df597e499600357c86ad0b1a755a13e9c6b1.tar.bz2 opensim-SC_OLD-88d2df597e499600357c86ad0b1a755a13e9c6b1.tar.xz |
* Fixed names.
* Added configs for Standalone
* Changed UserSericeBase to use useraccounts instead of user
Diffstat (limited to 'OpenSim/Services/UserService')
-rw-r--r-- | OpenSim/Services/UserService/UserServiceBase.cs | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Services/UserService/UserServiceBase.cs b/OpenSim/Services/UserService/UserServiceBase.cs index fea8b01..70ed594 100644 --- a/OpenSim/Services/UserService/UserServiceBase.cs +++ b/OpenSim/Services/UserService/UserServiceBase.cs | |||
@@ -40,20 +40,29 @@ namespace OpenSim.Services.UserAccountService | |||
40 | 40 | ||
41 | public UserAccountServiceBase(IConfigSource config) : base(config) | 41 | public UserAccountServiceBase(IConfigSource config) : base(config) |
42 | { | 42 | { |
43 | string dllName = String.Empty; | ||
44 | string connString = String.Empty; | ||
45 | string realm = "useraccounts"; | ||
46 | |||
47 | IConfig dbConfig = config.Configs["DatabaseService"]; | ||
48 | if (dbConfig != null) | ||
49 | { | ||
50 | dllName = dbConfig.GetString("StorageProvider", String.Empty); | ||
51 | connString = dbConfig.GetString("ConnectionString", String.Empty); | ||
52 | } | ||
53 | |||
43 | IConfig userConfig = config.Configs["UserAccountService"]; | 54 | IConfig userConfig = config.Configs["UserAccountService"]; |
44 | if (userConfig == null) | 55 | if (userConfig == null) |
45 | throw new Exception("No UserAccountService configuration"); | 56 | throw new Exception("No UserAccountService configuration"); |
46 | 57 | ||
47 | string dllName = userConfig.GetString("StorageProvider", | 58 | dllName = userConfig.GetString("StorageProvider", dllName); |
48 | String.Empty); | ||
49 | 59 | ||
50 | if (dllName == String.Empty) | 60 | if (dllName == String.Empty) |
51 | throw new Exception("No StorageProvider configured"); | 61 | throw new Exception("No StorageProvider configured"); |
52 | 62 | ||
53 | string connString = userConfig.GetString("ConnectionString", | 63 | connString = userConfig.GetString("ConnectionString", connString); |
54 | String.Empty); | ||
55 | 64 | ||
56 | string realm = userConfig.GetString("Realm", "users"); | 65 | realm = userConfig.GetString("Realm", realm); |
57 | 66 | ||
58 | m_Database = LoadPlugin<IUserAccountData>(dllName, new Object[] {connString, realm}); | 67 | m_Database = LoadPlugin<IUserAccountData>(dllName, new Object[] {connString, realm}); |
59 | 68 | ||