That's not quite the whole story. The rules around adverse possession were changed a while back so that even if someone has been using some property for a long time they can't just file a bit of paperwork and take the legal ownership away from the real owner. The real owner will be notified of the attempt and then has quite a long period of time to address the matter, for example by getting any unauthorised occupants removed instead. It's only if the owner doesn't take the required actions in time and the occupants then go through a second round of paperwork that the occupants can take over the title and even then there are still some other big conditions they have to satisfy first.
(I am not a lawyer or property expert but I did have this explained to me at length by someone who was when I was considering buying a property and he had some concerns about the legal title.)