Title: marktvb's Replies | WordPress.org

---

# marktvb

  [  ](https://wordpress.org/support/users/marktvb/)

 *   [Profile](https://wordpress.org/support/users/marktvb/)
 *   [Topics Started](https://wordpress.org/support/users/marktvb/topics/)
 *   [Replies Created](https://wordpress.org/support/users/marktvb/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/marktvb/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/marktvb/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/marktvb/engagements/)
 *   [Favorites](https://wordpress.org/support/users/marktvb/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/edu-registration-only/page/2/#post-5286922)
 * This is the registration page: [http://www.softwarephd.com/signup/](http://www.softwarephd.com/signup/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/edu-registration-only/page/2/#post-5286920)
 * Yes, I am using Paypal with s2member, but not on this particular registration
   form. This is for free members to signup, I do have another set of signup forms
   for vendors which pay with Paypal. I tried both of these sets of code on the 
   s2-hacks.php file one at a time (while the ban hammer plugin was deactivated)
   but it still allowed registration with non edu email addresses.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/edu-registration-only/page/2/#post-5286911)
 * Deactivated Ban Hammer. Tried to register again with non .edu email and it let
   me register successfully still. :<
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/edu-registration-only/page/2/#post-5286908)
 * Yes, that got rid of the error. When I tried a test signup though with a non .
   edu email address it still let me signup.
 * It is so frustrating that spammers are out there! I waste so much time each day
   deleting spam accounts of people who aren’t qualified to be a part of the community.
   I am using a plugin called Ban Hammer which lets me block domains one at a time,
   but I keep getting new spammers from different domains every day. Ban Hammer 
   has helped because I’ve blocked the obvious big ones like gmail and yahoo and
   hotmail (and mail.ru).
 * Could the plugin be causing the code you gave me to not work properly?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286906)
 * I really appreciate your help. When I added that code to the s2-hacks.php file
   the code just showed up at the top of the site. [http://www.softwarephd.com](http://www.softwarephd.com)
 * Did I do something wrong?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286886)
 * Okay, can you explain that a little more. I’m not sure what exactly to do. What
   do you mean by a hook?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286774)
 * Yes, I’m using an s2Member reg form.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286773)
 * Yes, I’m using an s2Member reg form.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286730)
 * Not anything I’ve setup that I know of. I use bluehost which is a pretty standard
   hosting service.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286686)
 * I tried adding it after the last ?> and it is now showing at the top of the page:
   [http://www.softwarephd.com/](http://www.softwarephd.com/)
 * Sorry, I’m not very familiar with custom coding. Thanks for your suggestions!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286651)
 * Thank you!
 * I pasted that code into the bottom of my functions.php page (above the last ?
   >), but when I pressed save it went to a HTTP 500 Internal Server Error page.
   Then the whole site stopped loading until I removed that snippet of code. Any
   ideas?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions] .edu registration only](https://wordpress.org/support/topic/edu-registration-only/)
 *  Thread Starter [marktvb](https://wordpress.org/support/users/marktvb/)
 * (@marktvb)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/edu-registration-only/#post-5286557)
 * I found this code in another forum, but when I tried to add it to functions.php
   file it still allowed registration from .com emails:
 * add_action(‘registration_errors’, ‘validate_email_domain’, 10, 3);
    function 
   validate_email_domain( $errors, $login, $email ) { $expression = “/.*@(.*.edu)/”;
 *  if ( is_email($email) ) {
    if ( !preg_match($expression,$email) ) { $errors-
   >add(’email_domain’, __(‘ERROR: You may only register with a .edu email address.’));}}
   return $errors; }

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