diff --git a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java index 6c4427cab4..8d8e836b35 100644 --- a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java +++ b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/system/security/impl/LdapService.java @@ -109,8 +109,7 @@ private NamingEnumeration getSearchResults(String userId) throws N sc.setReturningAttributes(new String[]{ldapUserIdentifyingAttribute}); sc.setSearchScope(SearchControls.SUBTREE_SCOPE); EqualsFilter filter = new EqualsFilter(ldapUserIdentifyingAttribute, userId); - NamingEnumeration results = ctx.search(ldapBaseDn, filter.toString(), sc); - return results; + return ctx.search(ldapBaseDn, filter.toString(), sc); } private void renderLdapEnv() {