domain_user_domainview

Versions
5 – 6
domain_user_domainview($op, $domain = array())

Implement hook_domainview()

Code

contributions/domain/domain_user/domain_user.module, line 346

<?php
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;
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.