Treat a UserLevel of -1 as an unverified account and refer them to their

activation email.
avinationmerge
Melanie 2010-04-30 05:33:45 +01:00
parent 08ebcdb0b8
commit 9c79fd6308
2 changed files with 11 additions and 0 deletions

View File

@ -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. " +

View File

@ -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);