Moved check for allow_registration into filter.
Merge pull request #179 from fbernitt/issue_5217_addendum

Moved check for allow_registration into filter.