I found a problem when I switched from one app to another. The multi-tenant did not work if the username and password were the same in the main database and tenants (or different tenants). For example, the password of admin is ofbiz in main database and in DEMO1 tenant, first log in to catalog as admin of tenant DEMO1, and then switch to the content app, the data of content app is from the main database instead of DEMO1.
I debugged this problem, and the code was missing to check the userlogin tenant in checkExternalLoginKey.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1001099 13f79535-47bb-0310-9956-ffa450edef68