Of course, it violates the immigration law, but the problem is the economical situation is too bad, and the company may have no choice and if you do not want to compromise, they will pay you full salary and then, they may fire you legally with any reason or even without any reason. The company has to survive, anyway.