Fix the query to retrieve files by user.
Merge pull request #4180 from HassenRiahi/RetrieveCorrectlyUserFiles

Fix the query to retrieve files by user.