2

I have a potential project coming up that will most likely use either Membrr or CT Subscriptions.

Users will have to register for a particular account depending on the level of access they require. For example one might be a 12 month subscription and another would be a month to month subscription which are both fine to setup.

However, the one unusual aspect is that they want to offer a free subscription account for healthcare users, where they would need to have an existing/live email address ending with .nhs.uk to be able to signup for the free account.

I'm looking for ideas as to the best way to tackle this healthcare user signup scenario?

Thanks in advance!

3 Answers 3

3

Just made simple ext which will check users email at the end of registration and if user email domain is in white list - send them validation email. After validation put them into the group which has full access.

hooks:

member_member_register

member_register_validate_members

3
  • Hi Max, thanks for the idea. I'll look into it as I haven't used the extension hooks before.
    – Wes
    Commented Oct 29, 2013 at 9:34
  • Do you planed to use email confirmation for all users (send them link for member account authorization)?
    – Max Lazar
    Commented Oct 29, 2013 at 9:48
  • Yes they would need to confirm the account using the registered email address so we know it's correct.
    – Wes
    Commented Oct 30, 2013 at 8:52
1

You'll need to write a custom add-on for this.

After doing a cursory google search, I found this article, which suggests pinging the domain's mail server, submitting the email address and using the server's response to validate.

I did another google search to see if there are PHP functions available to perform these actions. This Stack Overflow question & answer suggests using PHP's getmxrr function and PEAR's Net_SMTP package.

So then you'd just run the add-on either on form submission or, better yet, use an ajax call to do a "live" validation.

There seems to be a lot of info on this subject available via Google, I'd recommend searching around a bit to find a more comprehensive answer.

3
  • Hi kgrote, thanks for this although I'm hoping there will be a slightly simpler way to do it than creating a custom add-on.
    – Wes
    Commented Oct 29, 2013 at 9:36
  • 1
    simple ways to do this = simple way to get free access to content even w/o healthcare emails. If you will do email validation process on user side, then any person can get free access ease instead of pay for this. So question how you measure this risks.
    – Max Lazar
    Commented Oct 29, 2013 at 9:46
  • Yes fair point, I'm open to ideas as to the best solution but sometimes a simpler way can be just as effective but still ensuring it's a secure method.
    – Wes
    Commented Oct 30, 2013 at 8:54
1

I'd look at the simple approach and not sure of how your signup process is working.

Lets say you have some checkbox [free acct] [other acct] Via JS if they choose free, display a fixed input with an append like:

<input type='text' placeholder="your email"><span class="add-on">@.nhs.uk</span>

Very much like the Twitter bootstrap preprend/append treatment.

This illustrates to the user that the email needs to be an @nhs.uk email account. You could then inform them that an email will be sent to that address to verify them as valid and maybe a link to the site to signup for an @nhs.uk email account.

1
  • Hi Stuart, thanks for this approach. It's a good way of keeping it simple, I'm sure with a bit of jQuery validation we could do something like this.
    – Wes
    Commented Oct 29, 2013 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.