aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-06-25 00:08:14 +0100
committerJustin Clark-Casey (justincc)2011-06-25 00:08:14 +0100
commit5daac0584aed1a6764060b6c6a0a1f74360859f1 (patch)
treeaa6a92f5523c7591c718c5718878193fd7bebeed
parentImplement "set user level" console command to set the user level (which deter... (diff)
downloadopensim-SC_OLD-5daac0584aed1a6764060b6c6a0a1f74360859f1.zip
opensim-SC_OLD-5daac0584aed1a6764060b6c6a0a1f74360859f1.tar.gz
opensim-SC_OLD-5daac0584aed1a6764060b6c6a0a1f74360859f1.tar.bz2
opensim-SC_OLD-5daac0584aed1a6764060b6c6a0a1f74360859f1.tar.xz
Fix bug in reset user password where entering an invalid name would cause an exception. Also, convert this commands log output to console output.
Console output is more appropriate for console commands. The log only gets one side of the conversation anyway (since it doesn't necessarily record command inputs).
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index a65c04b..8b8a8f9 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -383,16 +383,19 @@ namespace OpenSim.Services.UserAccountService
383 383
384 UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName); 384 UserAccount account = GetUserAccount(UUID.Zero, firstName, lastName);
385 if (account == null) 385 if (account == null)
386 m_log.ErrorFormat("[USER ACCOUNT SERVICE]: No such user"); 386 {
387 MainConsole.Instance.OutputFormat("No such user as {0} {1}", firstName, lastName);
388 return;
389 }
387 390
388 bool success = false; 391 bool success = false;
389 if (m_AuthenticationService != null) 392 if (m_AuthenticationService != null)
390 success = m_AuthenticationService.SetPassword(account.PrincipalID, newPassword); 393 success = m_AuthenticationService.SetPassword(account.PrincipalID, newPassword);
394
391 if (!success) 395 if (!success)
392 m_log.ErrorFormat("[USER ACCOUNT SERVICE]: Unable to reset password for account {0} {1}.", 396 MainConsole.Instance.OutputFormat("Unable to reset password for account {0} {1}.", firstName, lastName);
393 firstName, lastName);
394 else 397 else
395 m_log.InfoFormat("[USER ACCOUNT SERVICE]: Password reset for user {0} {1}", firstName, lastName); 398 MainConsole.Instance.OutputFormat("Password reset for user {0} {1}", firstName, lastName);
396 } 399 }
397 400
398 protected void HandleSetUserLevel(string module, string[] cmdparams) 401 protected void HandleSetUserLevel(string module, string[] cmdparams)