BuddyPress: Allow only one email domain to register
Finally, I found the solution. Here is the code if anyone has the same issue and want to refer it. Using Action function wf_validate_email_domain() { global $bp; $email = $bp->signup->email; $email_exploded = explode(‘@’, $email); // split on @ and return last value of array (the domain) $domain = array_pop($email_exploded); $email_domains = get_option(‘allowed_email_domains’); $allowed_email_domains = array_map(‘trim’, … Read more