SHARE
TWEET

Untitled

a guest Mar 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function wpse_check_email_domain($errors, $sanitized_user_login, $user_email) {
  2.     $start = strpos($user_email, '@uniname.ac.uk');
  3.     if(!$start)
  4.         $errors->add('ERROR', 'Only users with "@uniname.ac.uk" email domain can register!');
  5.     return $errors;
  6. }
  7. add_filter('registration_errors', 'wpse_check_email_domain', 10, 3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top