Created
August 6, 2014 13:30
-
-
Save DeskWOW/a291e186aa7408255f57 to your computer and use it in GitHub Desktop.
Private Portal — Require specific user email address domain to allow support center access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% unless current_user == nil or current_user.is_guest %} | |
{% assign email_domain = current_user.customer.email | split: '@' %} | |
{% if email_domain[1] contains "sitechcs.com" %} | |
Success! You'll want ALL code currently in your 'Layout' to go here so the site loads. | |
{% else %} | |
If the user sees this text, it means they logged in, but their email domain isn't approved. | |
{% endif %} | |
{% else %} | |
If the user sees this text, it means they are not logged in. So you'll likely want to prompt them to login or auto redirect them to login page here. | |
{% endunless %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment