No that is not legal. But why does your friend misbehave?