boolean authenticated = false;
boolean userEnabled = false;
boolean weblogEnabled = false;
boolean apiEnabled = false;
boolean weblogFound = false;
WebsiteData website = null;
UserData user = null;
try
{
// Get Roller request object for current thread
RollerRequest rreq = RollerRequest.getRollerRequest();
UserManager userMgr = RollerFactory.getRoller().getUserManager();
user = userMgr.getUserByUsername(username);
userEnabled = user.getEnabled().booleanValue();
website = userMgr.getWebsiteByHandle(blogid);
if (website != null) {
weblogFound = true;
weblogEnabled = website.getEnabled().booleanValue();
apiEnabled = website.getEnableBloggerApi().booleanValue();
}
if (user != null)
{
// are passwords encrypted?