Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vjekoart committed Jul 31, 2015
2 parents 55f34ee + 33ff620 commit 8442ecb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Controller/ExportController.php
Expand Up @@ -25,11 +25,13 @@ public function generateCsvAction() {

$handle = fopen('php://output','w+');

fputcsv($handle, array('Email','Gender','Country','City','T-Shirt','Food preference'),';');
fputcsv($handle, array('Email', 'Hash', 'Gender','Country','City','T-Shirt','Food preference'),';');
//$results = $this->connection->query('SELECT email, gender, country, city, tshirt, foodPreference FROM user');
//$results->execute();
foreach ($users as $user) {
fputcsv($handle, array($user->getEmail(),
fputcsv($handle, array(
$user->getEmail(),
md5($this->container->getParameter('email_hash_prefix').$user->getEmail()),
$user->getGender(),
$user->getCountry(),
$user->getCity(),
Expand All @@ -47,4 +49,4 @@ public function generateCsvAction() {

return $response;
}
}
}

0 comments on commit 8442ecb

Please sign in to comment.