UserRepository repository = new UserRepository();
email = email.toLowerCase();
UserProp prop = repository.getUserByEmail(email);
APIResponse resp = new APIResponse();
if (null == prop) {
resp.statusCode = Status.ERROR_INVALID_USER;
resp.object = "[" + email + "] is not set up as a user";
return resp;
}
resp.statusCode = Status.SUCCESS;
resp.object = prop;
return resp;
} catch (Exception ex) {
return new APIResponse(ex);
}
}