getByEmail($mail); if(!$customer) anta_log($mail); else { $customer->company = $customer->lastname.' - '.$customer->firstname; $customer->lastname = 'Privilégié'; $customer->firstname = 'Membre'; $customer->optin = 1; $customer->id_default_group = 4; $customer->updateGroup(array(4)); $customer->update(); } } else anta_log($mail); $i++; echo $i."\r\n"; } function anta_log($msg='') { $file = dirname(__FILE__).'/result_import'.date("d-m-Y").'.txt'; if($fp = fopen($file, 'a+') ) { fseek($fp, SEEK_END); if($msg == '') { fputs($fp,''."\n"); } else { fputs($fp, ''.$msg."\n"); } } } ?>