Lag switching is a bug that a lot of people have been exploiting at my games. The users will turn off their WiFi momentarily and then turn it back on once they have moved/attacked.
Lag switching is not a bug. As long as the client doesn’t time out, and can reconnect in time, they’ll remain in the server. It’s impossible to distinguish this from lag. There are various solutions depending on the nature of your game and problem, but we don’t have enough information to actually help you. I recommend posting in “Development Discussion” with more information if you’d like help.
You can validate this kind of thing on the server. Just make sure they aren’t 'porting around.