09-19-2017 08:52 AM
Hi Can someone explain me how to differentiate between a user that has an account and a user that does not have an account in Nuxeo java client? I create a NuxeoClient instance using: NuxeoClient nuxeoClient = new NuxeoClient(URL, userName, password); Apperently if the userName or password does not belong to a real account the NuxeoClient does not return null.What i want to do is to distinguish between a userName that does not have an account so i can show a message that the account does not exist.I think i can do this by catching the Exception it throws but i wanted to know if there is another way
09-22-2017 05:55 AM
Assuming the password
is the correct one for a user, the only way to check if a user exists or not is using the NuxeoClient#connect
method and catch the NuxeoClientException
:
try {
NuxeoClient nuxeoClient = new NuxeoClient(URL, userName, password);
} catch (NuxeoClientException e) {
// user does not exist on the Nuxeo Server (or password is incorrect but user exists...)
}
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.