You are here

function _domain_user_list in Domain Access 7.3

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

Helper function to get the names of all domains for a user.

Parameters

$uid: The user id.

Return value

An array of domain names.

1 call to _domain_user_list()
domain_form_user_admin_account_alter in ./domain.module
Implements hook_form_alter().

File

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

Code

function _domain_user_list($uid) {
  $temp_account = new stdClass();
  $temp_account->uid = $uid;
  $list = domain_get_user_domains($temp_account, FALSE);
  $domains = domain_domains();
  $user_domains = array();
  foreach ($list as $domain_id) {
    $user_domains[] = check_plain($domains[$domain_id]['sitename']);
  }
  return $user_domains;
}