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);
|
$users = user_load_multiple($uids);
|
||||||
// dsm($users, "users");
|
// dsm($users, "users");
|
||||||
|
|
||||||
$companies_material_cache = array();
|
$companies = array(); // cache array
|
||||||
|
$companies_material_cache = array(); // cache array
|
||||||
$items = [];
|
$items = [];
|
||||||
$headers = ['company', 'mail', 'materials'];
|
$headers = ['company', 'mail', 'materials'];
|
||||||
foreach ($users as $uid => $user) {
|
foreach ($users as $uid => $user) {
|
||||||
// $item = [];
|
// $item = [];
|
||||||
// TODO: get company from
|
// TODO: get company from
|
||||||
$company_tid = $user->field_company['und'][0]['tid'];
|
$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
|
// avoid users withour company
|
||||||
if(!isset($company->name)){
|
if(!isset($company->name)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user