aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/UserAccountService
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/UserAccountService')
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index 6923293..3f1744d 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -277,8 +277,9 @@ namespace OpenSim.Services.UserAccountService
277 #endregion 277 #endregion
278 278
279 #region Console commands 279 #region Console commands
280
280 /// <summary> 281 /// <summary>
281 /// Create a new user 282 /// Handle the create user command from the console.
282 /// </summary> 283 /// </summary>
283 /// <param name="cmdparams">string array with parameters: firstname, lastname, password, locationX, locationY, email</param> 284 /// <param name="cmdparams">string array with parameters: firstname, lastname, password, locationX, locationY, email</param>
284 protected void HandleCreateUser(string module, string[] cmdparams) 285 protected void HandleCreateUser(string module, string[] cmdparams)
@@ -304,6 +305,18 @@ namespace OpenSim.Services.UserAccountService
304 email = MainConsole.Instance.CmdPrompt("Email", ""); 305 email = MainConsole.Instance.CmdPrompt("Email", "");
305 else email = cmdparams[5]; 306 else email = cmdparams[5];
306 307
308 CreateUser(firstName, lastName, password, email);
309 }
310
311 /// <summary>
312 /// Create a user
313 /// </summary>
314 /// <param name="firstName"></param>
315 /// <param name="lastName"></param>
316 /// <param name="password"></param>
317 /// <param name="email"></param>
318 public void CreateUser(string firstName, string lastName, string password, string email)
319 {
307 UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); 320 UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
308 if (null == account) 321 if (null == account)
309 { 322 {
@@ -338,7 +351,6 @@ namespace OpenSim.Services.UserAccountService
338 else 351 else
339 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.", 352 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.",
340 firstName, lastName); 353 firstName, lastName);
341
342 } 354 }
343 else 355 else
344 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to retrieve home region for account {0} {1}.", 356 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to retrieve home region for account {0} {1}.",
@@ -350,7 +362,6 @@ namespace OpenSim.Services.UserAccountService
350 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.", 362 m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.",
351 firstName, lastName); 363 firstName, lastName);
352 364
353
354 m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName); 365 m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", firstName, lastName);
355 } 366 }
356 } 367 }
@@ -358,7 +369,6 @@ namespace OpenSim.Services.UserAccountService
358 { 369 {
359 m_log.ErrorFormat("[USER ACCOUNT SERVICE]: A user with the name {0} {1} already exists!", firstName, lastName); 370 m_log.ErrorFormat("[USER ACCOUNT SERVICE]: A user with the name {0} {1} already exists!", firstName, lastName);
360 } 371 }
361
362 } 372 }
363 373
364 protected void HandleResetUserPassword(string module, string[] cmdparams) 374 protected void HandleResetUserPassword(string module, string[] cmdparams)