From 9c79fd630819412f4db94c86caea73200933db5d Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 30 Apr 2010 05:33:45 +0100 Subject: Treat a UserLevel of -1 as an unverified account and refer them to their activation email. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 5 +++++ OpenSim/Services/LLLoginService/LLLoginService.cs | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'OpenSim/Services') 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 public static LLFailedLoginResponse InventoryProblem; public static LLFailedLoginResponse DeadRegionProblem; public static LLFailedLoginResponse LoginBlockedProblem; + public static LLFailedLoginResponse UnverifiedAccountProblem; public static LLFailedLoginResponse AlreadyLoggedInProblem; public static LLFailedLoginResponse InternalError; @@ -80,6 +81,10 @@ namespace OpenSim.Services.LLLoginService LoginBlockedProblem = new LLFailedLoginResponse("presence", "Logins are currently restricted. Please try again later.", "false"); + UnverifiedAccountProblem = new LLFailedLoginResponse("presence", + "Your account has not yet been verified. Please check " + + "your email and click the provided link.", + "false"); AlreadyLoggedInProblem = new LLFailedLoginResponse("presence", "You appear to be already logged in. " + "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 return LLFailedLoginResponse.UserProblem; } + if (account.UserLevel < 0) + { + m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: Unverified account"); + return LLFailedLoginResponse.UnverifiedAccountProblem; + } + if (account.UserLevel < m_MinLoginLevel) { m_log.InfoFormat("[LLOGIN SERVICE]: Login failed, reason: login is blocked for user level {0}", account.UserLevel); -- cgit v1.1