optmized industriels esport
This commit is contained in:
parent
be2da7afe0
commit
abb106d7c2
@ -217,14 +217,20 @@ function materio_contactops_export(){
|
||||
$users = user_load_multiple($uids);
|
||||
// dsm($users, "users");
|
||||
|
||||
$companies_material_cache = array();
|
||||
$companies = array(); // cache array
|
||||
$companies_material_cache = array(); // cache array
|
||||
$items = [];
|
||||
$headers = ['company', 'mail', 'materials'];
|
||||
foreach ($users as $uid => $user) {
|
||||
// $item = [];
|
||||
// TODO: get company from
|
||||
$company_tid = $user->field_company['und'][0]['tid'];
|
||||
$company = taxonomy_term_load($company_tid);
|
||||
if(isset($companies[$company_tid])){
|
||||
$company = $companies[$company_tid];
|
||||
}else{
|
||||
$company = taxonomy_term_load($company_tid);
|
||||
$companies[$company_tid] = $company;
|
||||
}
|
||||
|
||||
// avoid users withour company
|
||||
if(!isset($company->name)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user