Skip to content

Commit

Permalink
OF-1219: Fix class cast exception
Browse files Browse the repository at this point in the history
  • Loading branch information
GregDThomas authored and guusdk committed Nov 23, 2019
1 parent 3287a23 commit 8c7c663
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions xmppserver/src/main/webapp/setup/ldap-user.jspf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
org.jivesoftware.admin.LdapUserProfile,
org.jivesoftware.openfire.ldap.LdapManager" %>
<%@ page import="org.jivesoftware.openfire.ldap.LdapUserProvider"%>
<%@ page import="org.jivesoftware.openfire.user.UserProvider"%>
<%@ page import="org.jivesoftware.openfire.user.UserManager" %>
<%@ page import="org.jivesoftware.util.*" %>

Expand Down Expand Up @@ -135,10 +136,10 @@
if (save) {
manager.setUsernameField(usernameField);
if (searchFields != null) {
if ("org.jivesoftware.openfire.ldap.LdapUserProvider"
.equals(JiveGlobals.getProperty("provider.user.className"))) {
final UserProvider userProvider = UserManager.getUserProvider();
if (userProvider instanceof LdapUserProvider) {
// Update current instance being used
((LdapUserProvider) UserManager.getUserProvider()).setSearchFields(searchFields);
((LdapUserProvider) userProvider).setSearchFields(searchFields);
} else {
// Just update the property. It will be later used by LdapUserProvider
JiveGlobals.setProperty("ldap.searchFields", searchFields);
Expand Down

0 comments on commit 8c7c663

Please sign in to comment.