Can you have a consumer unit in a toilet?
If you can get to the consumer unit from the hallway side, then it's fine. The waste pipe can exit under the toilet or into the back of the room where the electrics are.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.