private Mono<UpdateResult> updateUsers(
            Set<Long> userIds,
            @Nullable String name,
            @Nullable String intro,
            @Nullable String profilePicture,
            @Nullable ProfileAccessStrategy profileAccessStrategy,
            @Nullable Long roleId,
            @Nullable Date registrationDate,
            @Nullable Boolean isActive,
            @Nullable byte[] password,
            @Nullable Map<String, Object> userDefinedAttributes,
            @Nullable ClientSession session) {
        return userRepository
                .updateUsers(userIds,
                        password,
                        name,
                        intro,
                        profilePicture,
                        profileAccessStrategy,
                        roleId,
                        registrationDate,
                        isActive,
                        userDefinedAttributes,
                        session)
                .flatMap(result -> Boolean.FALSE.equals(isActive) && result.getModifiedCount() > 0
                        ? sessionService
                                .disconnect(userIds,
                                        SessionCloseStatus.USER_IS_DELETED_OR_INACTIVATED)
                                .onErrorComplete(t -> {
                                    LOGGER.error(
                                            "Caught an error while closing the sessions of the users {} after inactivating the users",
                                            userIds,
                                            t);
                                    return true;
                                })
                                .thenReturn(result)
                        : Mono.just(result));
    }
@return Possible codes: {@link ResponseStatusCode#OK}
        {@link ResponseStatusCode#NOT_FRIEND_TO_QUERY_USER_PROFILE}
        {@link ResponseStatusCode#BLOCKED_USER_TO_QUERY_USER_PROFILE}
        {@link ResponseStatusCode#SERVER_INTERNAL_ERROR}
        {@link ResponseStatusCode#RESOURCE_NOT_FOUND}
turms-service/src/main/java/im/turms/service/domain/user/service/UserService.java