Ejemplo n.º 1
0
 public function process()
 {
     if (array_key_exists('contact_id', $this->request->get)) {
         $contacts = new Hm_Contact_Store($this->user_config);
         $contact = $contacts->get($this->request->get['contact_id']);
         $to = sprintf('"%s" <%s>', $contact->value('display_name'), $contact->value('email_address'));
         $this->out('compose_draft', array('draft_to' => $to, 'draft_subject' => '', 'draft_body' => ''));
     }
 }
Ejemplo n.º 2
0
 public function process()
 {
     $contacts = new Hm_Contact_Store($this->user_config);
     if (array_key_exists('contact_id', $this->request->get)) {
         $contact = $contacts->get($this->request->get['contact_id']);
         if (is_object($contact)) {
             $current = $contact->export();
             $current['id'] = $this->request->get['contact_id'];
             $this->out('current_contact', $current);
         }
     }
     $this->out('contact_store', $contacts);
 }