Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function executeUserEmail(sfWebRequest $request)
- {
- if ($request->isMethod("post"))
- {
- $option = $request->getParameter('report_type');
- // get list of all user profiles for option
- $fields = array('email', 'first_name', 'last_name', 'address', 'city', 'state', 'zipcode', 'country', 'age', 'income');
- $users = Doctrine::getTable('sfGuardUserProfile')->getEmailSubscribers($option, $fields)->execute();
- $exportManager = new sfExportManager($this->getResponse());
- $exportManager->export($users, $fields, 'Email Report');
- }
- }
Add Comment
Please, Sign In to add comment