この関数の適用範囲(スコープ)はプライベートのため、プラグインやテーマからはご利用できません。
関数
RegisterWithAmazon::createAccount()
Copied from usceshop.class.php
regist_member
method since it’s impossible to skip the validation check
戻り値 戻り値
ファイル: src/API/RegisterWithAmazon.php
private function createAccount() { global $usces, $wpdb; $mode = $_POST['member_regmode']; $member_table = $wpdb->prefix . 'usces_member'; $id = $usces->check_member_email($_POST['customer']['mailaddress1']); if (!empty($id)) { $usces->error_message = __('This e-mail address can not be registered.', 'usces'); return $mode; } else { $point = $usces->options['start_point']; $salt = usces_get_salt('', 1); $pass = usces_get_hash(trim($_POST['customer']['password1']), $salt); $name1 = isset($_POST['customer']['name1']) ? trim($_POST['customer']['name1']) : ''; $name2 = isset($_POST['customer']['name2']) ? trim($_POST['customer']['name2']) : ''; $name3 = isset($_POST['customer']['name3']) ? trim($_POST['customer']['name3']) : ''; $name4 = isset($_POST['customer']['name4']) ? trim($_POST['customer']['name4']) : ''; $zipcode = isset($_POST['customer']['zipcode']) ? trim($_POST['customer']['zipcode']) : ''; $pref = isset($_POST['customer']['pref']) ? trim($_POST['customer']['pref']) : ''; $address1 = isset($_POST['customer']['address1']) ? trim($_POST['customer']['address1']) : ''; $address2 = isset($_POST['customer']['address2']) ? trim($_POST['customer']['address2']) : ''; $address3 = isset($_POST['customer']['address3']) ? trim($_POST['customer']['address3']) : ''; $tel = isset($_POST['customer']['tel']) ? trim($_POST['customer']['tel']) : ''; $fax = isset($_POST['customer']['fax']) ? trim($_POST['customer']['fax']) : ''; $country = isset($_POST['customer']['country']) ? trim($_POST['customer']['country']) : ''; $query = $wpdb->prepare( "INSERT INTO $member_table (mem_email, mem_pass, mem_status, mem_cookie, mem_point, mem_name1, mem_name2, mem_name3, mem_name4, mem_zip, mem_pref, mem_address1, mem_address2, mem_address3, mem_tel, mem_fax, mem_delivery_flag, mem_delivery, mem_registered, mem_nicename) VALUES (%s, %s, %d, %s, %d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s, %s, %s)", trim($_POST['customer']['mailaddress1']), $pass, 0, '', $point, $name1, $name2, $name3, $name4, $zipcode, $pref, $address1, $address2, $address3, $tel, $fax, '', '', get_date_from_gmt(gmdate('Y-m-d H:i:s', time())), '' ); $res = $wpdb->query($query); if ($res !== false) { $member_id = $wpdb->insert_id; $user = $_POST['customer']; $user['ID'] = $member_id; $usces->set_member_meta_value('customer_country', $country, $member_id); if (!empty($salt)) { $usces->set_member_meta_value('mem_salt', $salt, $member_id); } $res = $usces->reg_custom_member($member_id); /** * Mirrored Welcart filter * * @ignore */ if (apply_filters('usces_filter_veirfyemail_newmemberfromcart', false, $user)) { return 'cartverifying'; } /** * Mirrored Welcart action hook * * @ignore */ do_action('usces_action_member_registered', $_POST['customer'], $member_id); usces_send_regmembermail($user); $_POST['loginmail'] = trim($_POST['customer']['mailaddress1']); $_POST['loginpass'] = trim($_POST['customer']['password1']); if ($usces->member_login() == 'member') { $_SESSION['usces_entry']['member_regmode'] = 'editmemberfromcart'; return 'newcompletion'; } } else { $usces->error_message = __('Error:failure in update', 'usces'); return $mode; } } }