I agree that teachers should be able to enforce discipline in schools.
With that said, I've got no idea what schools should do about things like sexting.
If I was a teacher and I confiscated a phone which might have illegal photos of underage students on it, I wouldn't want to turn a blind eye to that. But I also sure as hell wouldn't want to search it myself. I'd want that done by someone of unimpeachable character.