diff --git a/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs b/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs index 5606c4cf77..12c166c0fb 100644 --- a/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs +++ b/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs @@ -57,7 +57,7 @@ namespace OpenGrid.Framework.Data.MSSQL dbcommand.CommandText = sql; foreach (KeyValuePair param in parameters) { - dbcommand.Parameters.Add(param.Key, param.Value); + dbcommand.Parameters.AddWithValue(param.Key, param.Value); } return (IDbCommand)dbcommand; diff --git a/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices.UserServer/UserManager.cs index 7473685cb1..057fb79a1c 100644 --- a/OpenGridServices.UserServer/UserManager.cs +++ b/OpenGridServices.UserServer/UserManager.cs @@ -98,5 +98,56 @@ namespace OpenGridServices.UserServer return null; } + + public UserAgentData getUserAgent(LLUUID uuid) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.getAgentByUUID(uuid); + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + public UserAgentData getUserAgent(string name) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.getAgentByName(name); + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + public UserAgentData getUserAgent(string fname, string lname) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.getAgentByName(fname,lname); + } + catch (Exception e) + { + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } } }