If I was religious and a churchgoer, and the church had a good reason to check my ID upon entry and record attendance, then yes I'd probably accept it as a condition of attending.
Though I can't imagine what rationale there would be to start requiring churches to do this.
For example, to protect impressionable children from exposure to it. Same as the stated rationale for the porn law.