code: @Override
      public void disable(User appSensorUser) {
          logger.info("Request received to disable user <{}>.", appSensorUser.getUsername());
  
          if (userDetailsManager == null) {
              logger.warn("Could not disable user [" + appSensorUser.getUsername()
                          + "] since the spring security " +
                          "UserDetailsManager is not properly configured.");
              return;
          }
  
          UserDetails springUser = userDetailsManager.loadUserByUsername(appSensorUser.getUsername());
  
          if (springUser == null) {
              logger.warn("Could not disable user [" + appSensorUser.getUsername()
                          + "] because the user could not " +
                          "be found by lookup");
              return;
          }
  
          logger.info("Disabling user <{}>.", springUser.getUsername());
          userDetailsManager.updateUser(new DisabledUser(springUser));
  
          logger.info("After disabling user <{}>, also logging out so the disable gets triggered.",
              springUser.getUsername());
          userResponseCache.setUserLoggedOut(appSensorUser.getUsername());
      }
docs: {@inheritDoc}