I need help modifying the code below. I'm using the Ultimate Member plugin on my Wordpress site for membership. I only want those people within my organization to be able to register for the site (my departments use different domains for their email addresses, it's a headache and I don't want to get into that). Right now, it will automatically validate emails from @company1.com, but I need to add up to 10 more email addresses to that code to perform automatic validation. Basically, anyone that doesn't have an email address listed, is automatically denied membership to the site.
add_action('um_before_new_user_register', 'require_google_email_for_signup');
function require_google_email_for_signup( $args ) {
extract($args);
if ( !strstr( $user_email, '@company1.com' ) )
exit( wp_redirect( add_query_arg('err', 'you_must_have_googlemail') ) );
}