fix(invitefriends): check if registration is allowed before display menu item and pages

Refs #6356
Fixes #6400