function domain_user_domainview in Domain Access 6.2
Same name and namespace in other branches
- 5 domain_user/domain_user.module \domain_user_domainview()
Implement hook_domainview()
File
- domain_user/
domain_user.module, line 367 - Creates unique subdomains for registered users.
Code
function domain_user_domainview($op, $domain = array()) {
switch ($op) {
case 'header':
return array(
array(
'data' => t('User'),
'field' => 'du.uid',
),
);
break;
case 'select':
return 'du.uid';
case 'join':
return "LEFT JOIN {domain_user} du ON du.domain_id = d.domain_id";
break;
case 'data':
if (isset($domain['uid'])) {
$account = user_load(array(
'uid' => $domain['uid'],
));
return l($account->name, 'user/' . $account->uid);
}
break;
}
}