﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
21142,Add a filter to domain_exists() function,jamescollins,ryan,"In Multisite, the domain_exists() function is used by WordPress to ""check whether the specified blogname is already taken"", however it doesn't provide any filter so that plugins can override the result.

'''Our Use Case:'''

On our multisite installs, we allow users to change their subdomain name (or domain name).

We keep a list of their previously used subdomains/domains, and if there is a HTTP request for one of their old domains, we automatically perform a 301 redirect to the new domain name.

However, we also want to make sure that other users cannot use any subdomain/domain name that has been used by another user.

Currently we have no way to override the return value of the domain_exists() function, which means we can't easily prevent other people from signing up for sites that use a domain/subdomain name 

'''Suggestion:'''

Add a simple filter to the end of the domain_exists() function. See attached patch.",enhancement,closed,normal,3.5,Multisite,,normal,fixed,has-patch commit,
