From 930d3745256ced37afb2d91817eba941d06a50b0 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Apr 2010 16:36:44 -0700 Subject: Expose Delete at IUserAccountData interface. It was there already. No changes in IUserAccountService, just the data layer. --- OpenSim/Data/Null/NullUserAccountData.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim/Data/Null/NullUserAccountData.cs') 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 return result; } + public bool Delete(string field, string val) + { + // Only delete by PrincipalID + if (field.Equals("PrincipalID")) + { + UUID uuid = UUID.Zero; + if (UUID.TryParse(val, out uuid) && m_DataByUUID.ContainsKey(uuid)) + { + UserAccountData account = m_DataByUUID[uuid]; + m_DataByUUID.Remove(uuid); + if (m_DataByName.ContainsKey(account.FirstName + " " + account.LastName)) + m_DataByName.Remove(account.FirstName + " " + account.LastName); + if (account.Data.ContainsKey("Email") && account.Data["Email"] != string.Empty && m_DataByEmail.ContainsKey(account.Data["Email"])) + m_DataByEmail.Remove(account.Data["Email"]); + + return true; + } + } + + return false; + } } } -- cgit v1.1