Esempio n. 1
0
 public function create_user_meta()
 {
     $this->_user_id = $this->unique_key_value($this->_user_email, "user_email");
     $rows = $this->_usermeta_rows();
     $query = DB::insert("usermeta", $this->_usermeta_columns());
     foreach ($rows as $key => &$value) {
         $rows[$key] = UTF8::str_ireplace(":id", $this->_user_id, $rows[$key]);
         $rows[$key] = UTF8::str_ireplace(":name", UTF8::ucfirst($this->_display_name), $rows[$key]);
         $rows[$key] = UTF8::str_ireplace(":level", "0", $rows[$key]);
         $rows[$key] = UTF8::str_ireplace(":capabilities", "a:1:{s:8:\"customer\";b:1;}", $rows[$key]);
         $rows[$key] = UTF8::str_ireplace(":billing_first_name", UTF8::get_value($this->_form, "display_name"), $rows[$key]);
         $rows[$key] = UTF8::str_ireplace(":billing_email", UTF8::get_value($this->_form, "user_email"), $rows[$key]);
         $rows[$key] = UTF8::str_ireplace(":billing_phone", UTF8::get_value($this->_form, "phone"), $rows[$key]);
         $query->values($rows[$key]);
     }
     //Debug::vars((string) $query);
     $query->execute();
 }
Esempio n. 2
0
 private function _send_mail()
 {
     $message = array("user" => array("name" => "*****@*****.**", "from" => "*****@*****.**", "from_name" => UTF8::ucfirst(UTF8::get_value($this->_form, "display_name")), "to" => "*****@*****.**", "subject" => UTF8::get_value($this->_form, "reason"), "html" => UTF8::get_value($this->_form, "message"), "user_email" => UTF8::get_value($this->_form, "user_email")));
     Mailer::factory("user", "say_hello", $message);
 }