diff --git a/jams-server/src/main/resources/webapp/js/search.js b/jams-server/src/main/resources/webapp/js/search.js
index 2fd27c79cbee7bdd8f6142cce16dedbbdc0aae21..50eaafff990b9a5bff13a74606552cc8139b39ab 100644
--- a/jams-server/src/main/resources/webapp/js/search.js
+++ b/jams-server/src/main/resources/webapp/js/search.js
@@ -158,7 +158,7 @@ function listAllUsers(data, statusCode, jqXHR)
   });
 
     setTimeout(function() {
-        ajaxApiCall(api_path_get_directories, 'GET', null, null, ishsqlConfig);
+        ajaxApiCall(api_path_get_directories, 'GET', null, null, isLocalDB);
     }, 100);
     addListenersForActions();
 }
@@ -443,20 +443,9 @@ function handleUserAutofill(data, statusCode, jqXHR) {
     }
 }
 
-function ishsqlConfig(data, statusCode, jqXHR){
-    if (jqXHR.status == 200 && data.length > 1) {
-        var resultSet = data;
-        // ignore the first result since it's the auth service for admin accounts that is always present.
-        for (i = 1; i < resultSet.length; i++) {
-            if (resultSet[i] === "net.jami.accountmanagementserver.hsqlconnector.HSQLConnector") {
-                $('.user-create-div').show();
-                $('.edit-user').show();
-                break;
-            }
-        }
-    } else if (jqXHR.status == 200 && data.length == 1) {
-        // ignore the first result since it's the auth service for admin accounts that is always present.
-        if (data[0] === "net.jami.accountmanagementserver.hsqlconnector.HSQLConnector") {
+function isLocalDB(data, statusCode, jqXHR){
+    if (jqXHR.status == 200) {
+        if (data[0].type === "LOCAL" && data[0].realm === "LOCAL") {
             $('.user-create-div').show();
             $('.edit-user').show();
         }