function directorySearchEnabled() {
          var successFn;
          var errorFn;

          if (directorySearchEnabledPromise) {