Happened to me. I paid rent for a couple of months to a lady that I thought owned the appartement. Then one day someone knocked on the door, asked who I was, why I was living in his appartement, and why his tenant stopped paying rent.
In retrospect, it was eye opening how gullible everyone involved was (myself included), and how little the police did about it.
For every appartement I've since rented I checked the official register to make sure my future landlord actually owns the place...