Пример #1
0
 public function insert(array $data)
 {
     $entity = parent::insert($data);
     //$dataEmail = array('nome'=>$data['nome'],'activationKey'=>$entity->getActivationKey());
     if ($entity) {
         return $entity;
     }
 }
Пример #2
0
 public function insert(array $data)
 {
     $entity = parent::insert($data);
     $dataEmail = array('nome' => $data['nome'], 'activationKey' => $entity->getActivationKey());
     if ($entity) {
         $mail = new Mail($this->transport, $this->view, 'add-user');
         $mail->setSubject('Confirmação de cadastro')->setTo($data['email'])->setData($dataEmail)->prepare()->send();
         return $entity;
     }
 }