diff options
-rw-r--r-- | OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs | 2 | ||||
-rw-r--r-- | OpenGridServices.UserServer/UserManager.cs | 51 |
2 files changed, 52 insertions, 1 deletions
diff --git a/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs b/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs index 5606c4c..12c166c 100644 --- a/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs +++ b/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs | |||
@@ -57,7 +57,7 @@ namespace OpenGrid.Framework.Data.MSSQL | |||
57 | dbcommand.CommandText = sql; | 57 | dbcommand.CommandText = sql; |
58 | foreach (KeyValuePair<string, string> param in parameters) | 58 | foreach (KeyValuePair<string, string> param in parameters) |
59 | { | 59 | { |
60 | dbcommand.Parameters.Add(param.Key, param.Value); | 60 | dbcommand.Parameters.AddWithValue(param.Key, param.Value); |
61 | } | 61 | } |
62 | 62 | ||
63 | return (IDbCommand)dbcommand; | 63 | return (IDbCommand)dbcommand; |
diff --git a/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices.UserServer/UserManager.cs index 7473685..057fb79 100644 --- a/OpenGridServices.UserServer/UserManager.cs +++ b/OpenGridServices.UserServer/UserManager.cs | |||
@@ -98,5 +98,56 @@ namespace OpenGridServices.UserServer | |||
98 | 98 | ||
99 | return null; | 99 | return null; |
100 | } | 100 | } |
101 | |||
102 | public UserAgentData getUserAgent(LLUUID uuid) | ||
103 | { | ||
104 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
105 | { | ||
106 | try | ||
107 | { | ||
108 | return plugin.Value.getAgentByUUID(uuid); | ||
109 | } | ||
110 | catch (Exception e) | ||
111 | { | ||
112 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
113 | } | ||
114 | } | ||
115 | |||
116 | return null; | ||
117 | } | ||
118 | |||
119 | public UserAgentData getUserAgent(string name) | ||
120 | { | ||
121 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
122 | { | ||
123 | try | ||
124 | { | ||
125 | return plugin.Value.getAgentByName(name); | ||
126 | } | ||
127 | catch (Exception e) | ||
128 | { | ||
129 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
130 | } | ||
131 | } | ||
132 | |||
133 | return null; | ||
134 | } | ||
135 | |||
136 | public UserAgentData getUserAgent(string fname, string lname) | ||
137 | { | ||
138 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | ||
139 | { | ||
140 | try | ||
141 | { | ||
142 | return plugin.Value.getAgentByName(fname,lname); | ||
143 | } | ||
144 | catch (Exception e) | ||
145 | { | ||
146 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
147 | } | ||
148 | } | ||
149 | |||
150 | return null; | ||
151 | } | ||
101 | } | 152 | } |
102 | } | 153 | } |