private OSDMap ForgotPassword(OSDMap map)
{
UUID UUDI = map["UUID"].AsUUID();
string Password = map["Password"].AsString();
IUserAccountService accountService = m_registry.RequestModuleInterface<IUserAccountService>();
UserAccount user = accountService.GetUserAccount(null, UUDI);
OSDMap resp = new OSDMap();
bool verified = user != null;
resp["Verified"] = OSD.FromBoolean(verified);
resp["UserLevel"] = OSD.FromInteger(0);
if (verified)
{
resp["UserLevel"] = OSD.FromInteger(user.UserLevel);
if (user.UserLevel >= 0)
{
IAuthenticationService auths = m_registry.RequestModuleInterface<IAuthenticationService>();
auths.SetPassword (user.PrincipalID, "UserAccount", Password);
}
else
{
resp["Verified"] = OSD.FromBoolean(false);
}
}
return resp;
}