marktvb
Forum Replies Created
-
This is the registration page: https://www.softwarephd.com/signup/
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.
Deactivated Ban Hammer. Tried to register again with non .edu email and it let me register successfully still. :<
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?
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. https://www.softwarephd.com
Did I do something wrong?
Okay, can you explain that a little more. I’m not sure what exactly to do. What do you mean by a hook?
Yes, I’m using an s2Member reg form.
Yes, I’m using an s2Member reg form.
Not anything I’ve setup that I know of. I use bluehost which is a pretty standard hosting service.
I tried adding it after the last ?> and it is now showing at the top of the page: https://www.softwarephd.com/
Sorry, I’m not very familiar with custom coding. Thanks for your suggestions!
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?
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;
}