A COUNCIL acted unlawfully in its provision of toilets at a primary school where the main toilets are in mixed-sex areas, a judge has ruled.