Guest User

Untitled

a guest
Jun 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2.  
  3. public function executeUserEmail(sfWebRequest $request)
  4. {
  5. if ($request->isMethod("post"))
  6. {
  7. $option = $request->getParameter('report_type');
  8.  
  9. // get list of all user profiles for option
  10. $fields = array('email', 'first_name', 'last_name', 'address', 'city', 'state', 'zipcode', 'country', 'age', 'income');
  11. $users = Doctrine::getTable('sfGuardUserProfile')->getEmailSubscribers($option, $fields)->execute();
  12.  
  13. $exportManager = new sfExportManager($this->getResponse());
  14. $exportManager->export($users, $fields, 'Email Report');
  15. }
  16. }
Add Comment
Please, Sign In to add comment