delete_user_media is a hook which is executed when is deleted a user's file.
The hook delete_user_media could be used to delete the files from the external servers. Since the Midrub version 0.0.7.0 i'm using it even in the apps to delete the records from the database for a file which is used in an app.
When the delete_user_media is executed? First of all, there are many verifications to understand if the user has the file and if the file is hosted in the local server. If the file is in the local server, first will be deleted and then executed the hook delete_user_media. If the file is not hosted on a local server, will be executed the file delete_user_media immediately.
The delete_user_media has one parameter: media_id