function _domain_user_list in Domain Access 7.2
Same name and namespace in other branches
- 6.2 domain.module \_domain_user_list()
- 7.3 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 640 - 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) {
if ($domain_id == -1) {
$domain_id = 0;
}
$user_domains[] = check_plain($domains[$domain_id]['sitename']);
}
return $user_domains;
}