aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService
diff options
context:
space:
mode:
authorMelanie2010-04-30 05:33:45 +0100
committerMelanie2010-04-30 05:33:45 +0100
commit9c79fd630819412f4db94c86caea73200933db5d (patch)
treef6408d3a4ab8ae82ff2a532dc23875438bcf4086 /OpenSim/Services/LLLoginService
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC_OLD-9c79fd630819412f4db94c86caea73200933db5d.zip
opensim-SC_OLD-9c79fd630819412f4db94c86caea73200933db5d.tar.gz
opensim-SC_OLD-9c79fd630819412f4db94c86caea73200933db5d.tar.bz2
opensim-SC_OLD-9c79fd630819412f4db94c86caea73200933db5d.tar.xz
Treat a UserLevel of -1 as an unverified account and refer them to their
activation email.
Diffstat (limited to 'OpenSim/Services/LLLoginService')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs5
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs6
2 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index ee30fa3..0cd8f5b 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -57,6 +57,7 @@ namespace OpenSim.Services.LLLoginService
57 public static LLFailedLoginResponse InventoryProblem; 57 public static LLFailedLoginResponse InventoryProblem;
58 public static LLFailedLoginResponse DeadRegionProblem; 58 public static LLFailedLoginResponse DeadRegionProblem;
59 public static LLFailedLoginResponse LoginBlockedProblem; 59 public static LLFailedLoginResponse LoginBlockedProblem;
60 public static LLFailedLoginResponse UnverifiedAccountProblem;
60 public static LLFailedLoginResponse AlreadyLoggedInProblem; 61 public static LLFailedLoginResponse AlreadyLoggedInProblem;
61 public static LLFailedLoginResponse InternalError; 62 public static LLFailedLoginResponse InternalError;
62 63
@@ -80,6 +81,10 @@ namespace OpenSim.Services.LLLoginService
80 LoginBlockedProblem = new LLFailedLoginResponse("presence", 81 LoginBlockedProblem = new LLFailedLoginResponse("presence",
81 "Logins are currently restricted. Please try again later.", 82 "Logins are currently restricted. Please try again later.",
82 "false"); 83 "false");
84 UnverifiedAccountProblem = new LLFailedLoginResponse("presence",
85 "Your account has not yet been verified. Please check " +
86 "your email and click the provided link.",
87 "false");
83 AlreadyLoggedInProblem = new LLFailedLoginResponse("presence", 88 AlreadyLoggedInProblem = new LLFailedLoginResponse("presence",
84 "You appear to be already logged in. " + 89 "You appear to be already logged in. " +
85 "If this is not the case please wait for your session to timeout. " + 90 "If this is not the case please wait for your session to timeout. " +
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 4d7dfd1..5301140 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -164,6 +164,12 @@ namespace OpenSim.Services.LLLoginService
164 return LLFailedLoginResponse.UserProblem; 164 return LLFailedLoginResponse.UserProblem;
165 } 165 }
166 166
167 if (account.UserLevel < 0)
168 {
169 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account");
170 return LLFailedLoginResponse.UnverifiedAccountProblem;
171 }
172
167 if (account.UserLevel < m_MinLoginLevel) 173 if (account.UserLevel < m_MinLoginLevel)
168 { 174 {
169 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel); 175 m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel);