The current behavior of the user.updatemedia is really weird. There are two cases:
1. If you update multiple users and you pass a media without a mediaid, it will delete all media for the given users and create a new media for each user.
2. If you update multiple users and pass a media WITH a mediaid, it will delete all media for the given users and only update the given media. That is, other users will be left without any media at all.
This should be discussed before fixed.