From b6097ae9a8a4566330d882213179feba6d05da62 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Dec 2009 22:23:17 +0000 Subject: Some modifications to user service. Query by name is implemented now --- OpenSim/Services/UserAccountService/UserAccountService.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Services/UserAccountService/UserAccountService.cs') diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs index 2e6f7dc..ee9ea94 100644 --- a/OpenSim/Services/UserAccountService/UserAccountService.cs +++ b/OpenSim/Services/UserAccountService/UserAccountService.cs @@ -44,6 +44,21 @@ namespace OpenSim.Services.UserAccountService public UserAccount GetUserAccount(UUID scopeID, string firstName, string lastName) { + UserAccountData[] d = m_Database.Get( + new string[] {"ScopeID", "FirstName", "LastName"}, + new string[] {scopeID.ToString(), firstName, lastName}); + + if (d.Length < 1) + return null; + + UserAccount u = new UserAccount(); + u.FirstName = d[0].FirstName; + u.LastName = d[0].LastName; + u.PrincipalID = d[0].PrincipalID; + u.ScopeID = d[0].ScopeID; + u.Email = d[0].Data["Email"].ToString(); + u.Created = Convert.ToInt32(d[0].Data["Created"].ToString()); + return null; } -- cgit v1.1