chore(invitefriends): check if registration is allowed before displaying...

... menu items and pages

Refs #6356
Fixes #6400