fix credentialed user do not have search authority

If credentialed user do not have search authority, the program does not run into the 'if' block. The program will be blocked by the exception thrown by searchLDAP called by searchLDAPForUser.