aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-18 15:50:18 +0000
committerJustin Clarke Casey2008-02-18 15:50:18 +0000
commit500d259c252f8c4f75c6f37e1067d57811426ddd (patch)
tree778ae131f7fdb01678f82cf8b94a25992e722390 /OpenSim/Grid/UserServer
parenta new attempt at converting to the right types (diff)
downloadopensim-SC_OLD-500d259c252f8c4f75c6f37e1067d57811426ddd.zip
opensim-SC_OLD-500d259c252f8c4f75c6f37e1067d57811426ddd.tar.gz
opensim-SC_OLD-500d259c252f8c4f75c6f37e1067d57811426ddd.tar.bz2
opensim-SC_OLD-500d259c252f8c4f75c6f37e1067d57811426ddd.tar.xz
* Do not allow a user to be created if one with the same name already exists
Diffstat (limited to 'OpenSim/Grid/UserServer')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs23
1 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 8c05d86..3500665 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -148,6 +148,12 @@ namespace OpenSim.Grid.UserServer
148 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X")); 148 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
149 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y")); 149 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
150 150
151 if (null != m_userManager.GetUserProfile(tempfirstname, templastname))
152 {
153 m_log.ErrorFormat("[USERS]: A user with the name {0} {1} already exists!", tempfirstname, templastname);
154 break;
155 }
156
151 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); 157 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty);
152 158
153 LLUUID userID = new LLUUID(); 159 LLUUID userID = new LLUUID();
@@ -157,7 +163,7 @@ namespace OpenSim.Grid.UserServer
157 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 163 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
158 } catch (Exception ex) 164 } catch (Exception ex)
159 { 165 {
160 m_log.ErrorFormat("[SERVER]: Error creating user: {0}", ex.ToString()); 166 m_log.ErrorFormat("[USERS]: Error creating user: {0}", ex.ToString());
161 } 167 }
162 168
163 try 169 try
@@ -167,7 +173,7 @@ namespace OpenSim.Grid.UserServer
167 } 173 }
168 catch (Exception ex) 174 catch (Exception ex)
169 { 175 {
170 m_log.ErrorFormat("[SERVER]: Error creating inventory for user: {0}", ex.ToString()); 176 m_log.ErrorFormat("[USERS]: Error creating inventory for user: {0}", ex.ToString());
171 } 177 }
172 m_lastCreatedUser = userID; 178 m_lastCreatedUser = userID;
173 break; 179 break;
@@ -204,13 +210,12 @@ namespace OpenSim.Grid.UserServer
204 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>(); 210 // RestObjectPosterResponse<List<InventoryFolderBase>> requester = new RestObjectPosterResponse<List<InventoryFolderBase>>();
205 // requester.ReturnResponseVal = TestResponse; 211 // requester.ReturnResponseVal = TestResponse;
206 // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser); 212 // requester.BeginPostObject<LLUUID>(m_userManager._config.InventoryUrl + "RootFolders/", m_lastCreatedUser);
207 List<InventoryFolderBase> folders = 213 SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>("POST",
208 SynchronousRestObjectPoster.BeginPostObject<LLUUID, List<InventoryFolderBase>>("POST", 214 m_userManager.
209 m_userManager. 215 _config.
210 _config. 216 InventoryUrl +
211 InventoryUrl + 217 "RootFolders/",
212 "RootFolders/", 218 m_lastCreatedUser);
213 m_lastCreatedUser);
214 break; 219 break;
215 } 220 }
216 } 221 }