Attach user to current domain

Public
</> CopyGet raw version
php
  1. $domain = domain_get_domain();
  2.  
  3. $query = db_insert('domain_editor')
  4. ->fields(array('uid', 'domain_id'))
  5. ->values(array('uid' => $account->uid, 'domain_id' => $domain['domain_id']));
  6.  
  7. $query->execute();