Ejemplo n.º 1
0
 public function restore($data)
 {
     $user = $this->getByEmail($data['email']);
     if (!empty($user)) {
         $this->mail->handleTemplate('restore.access', $user);
         $this->mail->to = $user['email'];
         $this->mail->send();
     }
 }
Ejemplo n.º 2
0
 public function createUser($data)
 {
     try {
         $id = $this->add($data);
         if (!empty($this->config->user['activation'])) {
             $this->mail->retrieveEmailTemplate('user.activation');
             $this->mail->handleTemplate('user.activation', $data);
             $this->mail->setTo($data['email']);
             $this->mail->send();
         }
     } catch (\Exception $E) {
         $this->errors[] = $E->getMessage();
         return false;
     }
     return $id;
 }