latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Restrict Signup to specific email domian(s)

Home Forums Community Forum Restrict Signup to specific email domian(s)

This topic contains 3 replies, has 2 voices. Last updated by  Ben Louis-Smith 3 years, 5 months ago.

Topic Author Topic
Posted: Monday Jul 29th, 2013 at 1:12 pm #54347

Hi,

We’re building a site for one of our clients that has a members only area for their employees. We need to allow only email addresses from the company domain when their employees signup. They employee hundreds and have quite a high turn-over rate in some of the lower positions so doing this manually is out of the question.

user@companyname.com can sign up
user@gmail.com can’t signup

I’ve had a good look round your site/forums and the internet in general but couldn’t find a definitive answer. I know we can use a 3rd party plugin which i assume would work in conjunction with your plugin but was hoping yours could do it as the 3rd party plugin is a freebie and hasn’t been updated in over 2 years!!!

Thank you for taking time to look over this :)

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Monday Jul 29th, 2013 at 1:14 pm #54348

Forgot to say it’s a WordPress driven site.

Posted: Tuesday Jul 30th, 2013 at 12:42 am #54369
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

s2Member does not directly support this ability. We do support some Email filtering, but our method is to prevent spammers or specific email addresses (such as those from gmail.com) from registering (click to see full image):

Sorry about that.


If you’re willing to have just a bit of custom code, you could achieve what you’re looking for.

Assuming that you’re using Pro Forms (I believe this will be required for you), you could use this filter to accomplish this
(/s2member-pro/includes/classes/gateways/paypal/paypal-responses.inc.php, line 841):

ws_plugin__s2member_pro_paypal_form_submission_validation_response

This validates all s2Member Form values, and you can check the email value there, and return an error message for Users based on if they have an appropriate email address.

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters

That’s about as far as we can go with custom code. If you need further assistance, we recommend http://jobs.wordpress.net, or another freelance web site where WordPress® experts are offering their expertise through a bid on your project.

Thanks, and let me know if you have any other questions. :-)

Posted: Wednesday Aug 7th, 2013 at 7:33 am #55347

Hi Bruce,

Sorry I forgot to reply to you!!!

Many thanks for the heads up, the custom code route looks great :)

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.