sync command uses the
sync system call.
The manual of the
sync system call says:
sync() causes all pending modifications to filesystem metadata and cached file data to be written to the underlying filesystems.
So sync will flush all the buffers. The term "belonging to users" doesn't apply to the buffers, the buffers belong to files and to file system metadata, not to users. It is possible that multiple users modify the same file, and it makes no sense for the file system and buffer sub system to track the changes to a specific user.