You are here

function domain_unique_domain in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain.module \domain_unique_domain()
  2. 7.3 domain.module \domain_unique_domain()
  3. 7.2 domain.module \domain_unique_domain()

Validate the domain against existing domains.

Parameters

$subdomain: Domain string to check

Return value

bool TRUE if unique; FALSE if duplicate.

1 call to domain_unique_domain()
domain_validate in ./domain.module
Validates a domain string.

File

./domain.module, line 1600
Core module functions for the Domain Access suite.

Code

function domain_unique_domain($subdomain) {
  $count = db_result(db_query("SELECT COUNT(domain_id) FROM {domain} WHERE subdomain = '%s'", $subdomain));
  return !(bool) $count;
}