>>> In uk it’s illegal to give a “bad” reference (or so I’ve been told)
Utter rubbish. Giving a bad reference might go against accepted codes within certain areas of employment but to do so is most definitely NOT illegal.
Anyone is free to write whatever they like about another person, and to provide that information to whomever they like, as long as they don't unfairly defame that person's character. (I'm clearly disregarding things like writing racially abusive social media comments about football players, etc, in my statement, as such matters aren't relevant here).
So, if a former employer wants to write "Fred Bloggs was the laziest employee I've ever had, with an appalling attendance record, disgusting personal hygiene, a total disregard for health and safety laws, no understanding whatsoever of acceptable customer service standards, constantly argumentative, often drunk at work and sometimes physically threatening as well", he's perfectly entitled to do so as long as those statements are true.
I wish that more employers would write genuine and meaningful references like that!