aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDiva Canto2010-04-16 16:36:44 -0700
committerDiva Canto2010-04-16 16:36:44 -0700
commit930d3745256ced37afb2d91817eba941d06a50b0 (patch)
treea39aa45e8291e4ec48efea277c6ec50c5baf70fe /OpenSim
parentrefactor: move DeatchObject() into the AttachmentsModule (diff)
downloadopensim-SC_OLD-930d3745256ced37afb2d91817eba941d06a50b0.zip
opensim-SC_OLD-930d3745256ced37afb2d91817eba941d06a50b0.tar.gz
opensim-SC_OLD-930d3745256ced37afb2d91817eba941d06a50b0.tar.bz2
opensim-SC_OLD-930d3745256ced37afb2d91817eba941d06a50b0.tar.xz
Expose Delete at IUserAccountData interface. It was there already. No changes in IUserAccountService, just the data layer.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/IUserAccountData.cs1
-rw-r--r--OpenSim/Data/Null/NullUserAccountData.cs21
2 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Data/IUserAccountData.cs b/OpenSim/Data/IUserAccountData.cs
index 6ee5995..906ba6c 100644
--- a/OpenSim/Data/IUserAccountData.cs
+++ b/OpenSim/Data/IUserAccountData.cs
@@ -48,6 +48,7 @@ namespace OpenSim.Data
48 { 48 {
49 UserAccountData[] Get(string[] fields, string[] values); 49 UserAccountData[] Get(string[] fields, string[] values);
50 bool Store(UserAccountData data); 50 bool Store(UserAccountData data);
51 bool Delete(string field, string val);
51 UserAccountData[] GetUsers(UUID scopeID, string query); 52 UserAccountData[] GetUsers(UUID scopeID, string query);
52 } 53 }
53} 54}
diff --git a/OpenSim/Data/Null/NullUserAccountData.cs b/OpenSim/Data/Null/NullUserAccountData.cs
index fc2c5d5..9eb94e6 100644
--- a/OpenSim/Data/Null/NullUserAccountData.cs
+++ b/OpenSim/Data/Null/NullUserAccountData.cs
@@ -135,5 +135,26 @@ namespace OpenSim.Data.Null
135 return result; 135 return result;
136 } 136 }
137 137
138 public bool Delete(string field, string val)
139 {
140 // Only delete by PrincipalID
141 if (field.Equals("PrincipalID"))
142 {
143 UUID uuid = UUID.Zero;
144 if (UUID.TryParse(val, out uuid) && m_DataByUUID.ContainsKey(uuid))
145 {
146 UserAccountData account = m_DataByUUID[uuid];
147 m_DataByUUID.Remove(uuid);
148 if (m_DataByName.ContainsKey(account.FirstName + " " + account.LastName))
149 m_DataByName.Remove(account.FirstName + " " + account.LastName);
150 if (account.Data.ContainsKey("Email") && account.Data["Email"] != string.Empty && m_DataByEmail.ContainsKey(account.Data["Email"]))
151 m_DataByEmail.Remove(account.Data["Email"]);
152
153 return true;
154 }
155 }
156
157 return false;
158 }
138 } 159 }
139} 160}