Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function wpse_check_email_domain($errors, $sanitized_user_login, $user_email) {
- $start = strpos($user_email, '@uniname.ac.uk');
- if(!$start)
- $errors->add('ERROR', 'Only users with "@uniname.ac.uk" email domain can register!');
- return $errors;
- }
- add_filter('registration_errors', 'wpse_check_email_domain', 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement