A PEI/TMC membrane modified with an ionic liquid with enhanced permeability and antibacterial properties for the removal of heavy metal ions.