No, it is not legal! The terms and conditions of the gaming provider prohibit to let others play with your account.
Actually, breaking TOC isn't against the law in most countries. You'll probably just be banned if they do have the restriction.
If you let someone play with your real money account while it is not allowed by terms and conditons, then this is cheating. And cheating is a criminal offense in almost every country in this world.
Most sites will not sue you, but it is still a criminal offense.