/**
  * Create a new user
  * @param array $exclude Attributes not to set
  * @param \PDO $db Database connection to use, default to master resource
  * @return boolean
  */
 public function Create($exclude = array(), &$db = FALSE)
 {
     // Set random password
     $this->iset('password', \Sonic\Resource\Crypt::_randomPassword());
     // Begin transaction
     $this->db->beginTransaction();
     // Call parent method
     if (!parent::Create($exclude, $db)) {
         $this->db->rollBack();
         return FALSE;
     }
     // Send email
     $email = new \Sonic\Resource\Email();
     $email->setPHPMail();
     $email->addHTML("\n\t\t\t<p style='font-family:Arial;font-size:12px;'>Your admin login details for <a href=\"" . URL_ROOT . "admin\">" . URL_ROOT . "admin</a> are:<br />\n\t\t\tUsername: "******"<br />\n\t\t\tPassword: "******"</p>\n\t\t");
     $email->addRecipient($this->iget('email'), $this->iget('first_name') . ' ' . $this->iget('last_name'));
     if (!$email->Send(EMAIL_FROM, 'Admin Account Login')) {
         $this->db->rollBack();
         new \Sonic\Message('error', 'Unable to send registration email. The user was not created');
         return FALSE;
     }
     // Commit
     $this->db->commit();
     // Return TRUE
     return TRUE;
 }